Table of Content
The ECT (Effective Connection Type) header is used by HTTP applications to adapt to the network connectivity of a user. Designed to optimize web performance, ECT estimates network speed based on metrics such as round-trip time and bandwidth. This allows developers to programmatically alter the behavior of web applications according to the user's network conditions.
The above is a basic sample of ECT header where the ECT is set to "4G".
The ECT header has 4 directives or connection types:
- 4G: High-speed internet with low latency.
- 3G: Moderate speed internet with slightly higher latency.
- 2G: Slow speed internet with high latency.
- slow-2G: Very slow internet with very high latency.
The value is set by the browser based on the user's real-time network conditions.
Examples of how to set the ECT header:
HTTP response header:
How to modify ECT header
The ModHeader Chrome extension is an effective tool to modify request headers like ECT. To use it:
- Install the ModHeader extension from the Chrome Web Store.
- Click the ModHeader icon in the toolbar and in the 'Request Headers' section, click 'Add'.
- Input 'ECT' in the name field, choose an effective connection type (e.g., '2G') in the value field, and save.
This capability to simulate different network conditions can help you optimize the performance of your web applications and provide enhanced user experiences.