The HTTP Accept-CH header is a response-type header that indicates the client hints that the server can support and should include in further requests.
Accept-CH: client hints
Note: The client hints can be more than one and are to be separated by commas.
Directives: The HTTP Accept-CH header accepts a single directive as mentioned above and described below:
- client hints: This directive contains a set of HTTP request header fields for proactive content negotiation for indicating a list of device and agent specific preferences.
Below examples will illustrate the HTTP Accepts-CH header:
- When one client hint is used. In this example, Viewport-Width is the client hint and it indicates the layout viewport width in CSS pixels.
- When multiple client hints are used. In this example Viewport-Width and Width are the client hints.
Accept-CH: Viewport-Width, Width
To check the Accept-CH in action go to Inspect Element -> Network check the response header for Accept-CH like below.
Supported Browsers: The browsers are compatible with the HTTP Accept-CH header are listed below:
- Google Chrome
- HTTP headers | Access-Control-Expose-Headers
- HTTP headers | Access-Control-Request-Headers
- HTTP headers | Access-Control-Allow-Headers.
- HTTP headers | Tk
- HTTP headers | From
- HTTP headers | Via
- HTTP headers | DNT
- HTTP headers | Alt-Svc
- HTTP headers | Allow
- HTTP Headers | TE
- HTTP headers | Age
- HTTP headers
- HTTP headers | If-None-Match
- HTTP headers | Connection
- HTTP headers | Want-Digest
- HTTP headers | X-Forwarded-For
- HTTP headers | Trailer
- HTTP headers | Host
- HTTP headers | Referer
- HTTP headers | Retry-After
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.