GO-Ve01
ServicesDevelopersBooksDictionaryPapersWikidataEncyclopediaSearchBabelCareersDeck

ECT header

The HTTP ECT request header is used in Client Hints to indicate the effective connection type: slow-2g, 2g, 3g, or 4g.

The HTTP **`ECT`** request header is used in [Client Hints](/docs/Web/HTTP/Guides/Client_hints) to indicate the effective connection type: `slow-2g`, `2g`, `3g`, or `4g`.

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, while `4g` might represent a fast fiber-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 in RTT and Downlink hints.

> [!NOTE]
> A server that specifies `ECT` in Accept-CH may also specify it in Vary to indicate that responses should be cached for different ECT values.

<table class="properties">
<tbody>
<tr>
<th scope="row">Header type</th>
<td>
Request header,
<a href="/en-US/docs/Web/HTTP/Guides/Client_hints">Client hint</a>
</td>
</tr>
<tr>
<th scope="row">Forbidden request header</th>
<td>No</td>
</tr>
</tbody>
</table>

## Syntax

```http
ECT: <value>
```

## Directives

- `<value>`
- : A value indicating effective connection type. Can be one of: `slow-2g`, `2g`, `3g`, or `4g`.

## Examples

A server first needs to opt in to receive the `ECT` header by sending the Accept-CH response header containing `ECT`.

```http
Accept-CH: ECT
```

Then on subsequent requests the client might send an `ECT` header back:

```http
ECT: 2g
```

## Specifications

## Browser compatibility

## See also

- [Improving user privacy and developer experience with User-Agent Client Hints](https://developer.chrome.com/docs/privacy-security/user-agent-client-hints) (developer.chrome.com)
- Network client hints
- Downlink
- RTT
- Save-Data

- Accept-CH
- [HTTP Caching > Vary](/docs/Web/HTTP/Guides/Caching#vary) and Vary
- NetworkInformation.effectiveType

source: MDN Web Docs mirror · page

Cite this

"ECT header". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/ECT

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·