Skip to main content

Accept-CH

ResponseActive

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

Accept-CH: <hint>[, <hint>]*

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

DirectiveDescription
Sec-CH-UAUser agent brand and version.
Sec-CH-UA-MobileWhether the device is mobile.
Sec-CH-Viewport-WidthViewport width in CSS pixels.
Device-MemoryDevice RAM in GiB (rounded: 0.25, 0.5, 1, 2, 4, 8).
DownlinkEffective downlink bandwidth in Mbps.
ECTEffective connection type: slow-2g, 2g, 3g, 4g.

Examples

Request viewport and DPR
http
Accept-CH: Sec-CH-Viewport-Width, Sec-CH-DPR, Device-Memory

Related

Specification

RFC 8942Accept-CH specification →