Accept CH
The HTTP Accept-CH 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. Note: The Accept-CH header does not block any request headers and is not considered a forbidden request header. It also does not fall under the category of CORS-safelisted response headers.
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 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
How to Modify Header using Requestly
Requestly is a powerful Chrome extension that allows you to modify HTTP headers, including the Accept-CH header. This is especially useful for testing how your application handles client hint tokens the server wants to receive during development or debugging. Steps to Modify the Accept-CH Header:
- Install and open the Requestly Chrome extension. You can find it on the Chrome Web Store.
- Create a new rule: Click on “Create Rule” and choose “Modify Headers” from the list of available rule types.
- Add a new header modification:
- Under “Action”, select “Add” or “Override”.
- In the “Header Name” field, enter Accept-CH.
- In the “Header Value” field, enter your desired value (e.g., Sec-CH-UA-Platform).
- Set the URL condition: Specify the URL or pattern where this header change should apply (e.g., https://your-api.com/\*).
- Save the rule.
Once set up, Requestly will inject the Accept-CH: Sec-CH-UA-Platform header into all matching requests, allowing you to control which client hints the browser sends, so you can test how your site adapts to different device and browser signals.
Set headers visually: intercept and modify HTTP headers without touching your code using Requestly.
Download Free →