ECT header
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.
The HTTPECTrequest header is used inClient Hints to indicate theeffective connection type:slow-2g,2g,3g, or4g.
The value represents the "network profile" that best matches the connection's latency and bandwidth, rather than the actual mechanisms used for transferring the data.For example,2g might be used to represent a slow Wi-Fi connection with high latency and low bandwidth, while4g might represent a fast fibre-based broadband network.
The hint allows a server to choose what information is sent based on the broad characteristics of the network. For example, a server might choose to send smaller versions of images and other resources on less capable connections. The value might also be used as a starting point for determining what information is sent, which is further refined using information inRTT andDownlink hints.
Note:A server that specifiesECT inAccept-CH may also specify it inVary to indicate that responses should be cached for different ECT values.
| Header type | Request header,Client hint |
|---|---|
| Forbidden request header | No |
In this article
Syntax
ECT: <value>Directives
<value>A value indicatingeffective connection type. Can be one of:
slow-2g,2g,3g, or4g.
Examples
A server first needs to opt in to receive theECT header by sending theAccept-CH response header containingECT.
Accept-CH: ECTThen on subsequent requests the client might send anECT header back:
ECT: 2gSpecifications
| Specification |
|---|
| Network Information API> # ect-request-header-field> |
Browser compatibility
See also
Improving user privacy and developer experience with User-Agent Client Hints (developer.chrome.com)
Network client hints
Accept-CHNetworkInformation.effectiveType