Accept-CH
{{HTTPSidebar}}
{{securecontext_header}}
The HTTP Accept-CH
{{Glossary("response header")}}
may be set by a server to specify which client hint headers should be included by the client in subsequent requests.
To ensure client hints are sent reliably, the Accept-CH
header should be persisted for all secure requests.
Header type | `{{Glossary("Response header")}}` |
---|---|
`{{Glossary("Forbidden request header")}}` | No |
`{{Glossary("CORS-safelisted response header")}}` | No |
Syntax
Accept-CH: <client-hints-headers>
// Client hint headers in a comma-separated list
Accept-CH: <ch-header-one>, <ch-header-two>
Examples
Client hint response headers
The following response headers indicate that the server accepts Viewport-Width
and Width
device client hints in subsequent requests.
The {{HTTPHeader("Vary")}}
header indicates which values were used to vary the response based on the accepted client hints.
Accept-CH: Viewport-Width, Width
Vary: Viewport-Width, Width
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}
See also
{{HTTPHeader("Vary")}}