Accept-CH
ResponseActiveAccept-CH (Client Hints) tells the browser which Client Hints headers the server wants on subsequent requests – device memory, viewport width, DPR (device pixel ratio), network conditions, etc. It is the opt-in mechanism for the Client Hints API. Browsers only send Client Hints to origins that have explicitly requested them via Accept-CH.
Description
Accept-CH is part of the Client Hints infrastructure. The server sends Accept-CH in a response, and the browser then includes the listed hints on subsequent requests to that origin. Common hints: Sec-CH-UA (user agent), Sec-CH-UA-Mobile, Sec-CH-Viewport-Width, Sec-CH-DPR, Device-Memory, Downlink, RTT, ECT. Requires a secure context (HTTPS). Hints can be delegated to third-party origins using the Permissions-Policy header.
Directives
| Directive | Description |
|---|---|
| Sec-CH-UA | User agent brand and version. |
| Sec-CH-UA-Mobile | Whether the device is mobile. |
| Sec-CH-Viewport-Width | Viewport width in CSS pixels. |
| Device-Memory | Device RAM in GiB (rounded: 0.25, 0.5, 1, 2, 4, 8). |
| Downlink | Effective downlink bandwidth in Mbps. |
| ECT | Effective connection type: slow-2g, 2g, 3g, 4g. |
Examples
Accept-CH: Sec-CH-Viewport-Width, Sec-CH-DPR, Device-Memory