Accept-CH

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

Accept-CH 標頭可以由伺服器設置,以指定用戶端應該在後續請求中包含哪些用戶端提示標頭。

標頭類型 回應標頭
禁止修改的標頭
CORS 安全清單回應標頭

備註: 用戶端提示僅在安全來源(通過 TLS)上可訪問。應該對所有安全請求持久化 Accept-CH 標頭,以確保可靠地發送用戶端提示。

語法

http
Accept-CH: <comma separated list of client hint headers>

範例

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

備註: 請根據接受的用戶端提示來改變回應

規範

Specification
HTTP Client Hints
# section-3.1

瀏覽器相容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Accept-CH client hint accept (response) header
Content-DPR token
DeprecatedNon-standard
DPR token
DeprecatedNon-standard
Device-Memory token
Experimental
Sec-CH-UA token
Experimental
Sec-CH-UA-Arch token
Experimental
Sec-CH-UA-Full-Version token
Experimental
Sec-CH-UA-Mobile token
Experimental
Sec-CH-UA-Model token
Experimental
Sec-CH-UA-Platform token
Experimental
Sec-CH-UA-Platform-Version token
Experimental
Viewport-Width token
DeprecatedNon-standard
Width token
DeprecatedNon-standard

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.
Non-standard. Check cross-browser support before using.
Deprecated. Not for use in new websites.

參見