Accept-CH 标头由服务器设置,以指定客户端应在后续请求中应包含哪些客户端客户端提示提示标头。
<table class="properties"> <tbody> <tr> <th scope="row">标头类型</th> <td>Response header</td> </tr> <tr> <th scope="row">Forbidden header name</th> <td>否</td> </tr> <tr> <th scope="row"> CORS-safelisted response header </th> <td>否</td> </tr> </tbody> </table>
[!NOTE] 客户端提示只能在安全源(通过 TLS)上访问。所有安全的请求都应该持久化
Accept-CH标头,以确保客户端提示可靠地发送。
语法
Accept-CH: <comma separated list of client hint headers>
示例
Accept-CH: Viewport-Width, Width
Vary: Viewport-Width, Width
[!NOTE] 请牢记要根据所接受的客户端提示更改响应。
规范
浏览器兼容性
参见
- Vary
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
