Back to Content

Accept-CH header

files/en-us/web/http/reference/headers/accept-ch/index.md

latest1.4 KB
Original Source

{{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.

<table class="properties"> <tbody> <tr> <th scope="row">Header type</th> <td>{{Glossary("Response header")}}</td> </tr> <tr> <th scope="row"> {{Glossary("CORS-safelisted response header")}} </th> <td>No</td> </tr> </tbody> </table>

Syntax

http
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 Sec-CH-Viewport-Width and Sec-CH-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.

http
Accept-CH: Sec-CH-Viewport-Width, Sec-CH-Width
Vary: Sec-CH-Viewport-Width, Sec-CH-Width

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • {{HTTPHeader("Vary")}}