Sec-CH-UA-Arch

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

实验性: 这是一项实验性技术
在将其用于生产之前,请仔细检查浏览器兼容性表格

安全上下文: 此项功能仅在一些支持的浏览器安全上下文(HTTPS)中可用。

Sec-CH-UA-Arch 用户代理客户端提示请求标头提供了用户代理的底层 CPU 架构,例如 ARM 或 x86。

例如,服务器可以使用它来选择并提供可执行文件的正确二进制格式供用户下载。

标头类型 Request header, 客户端提示
Forbidden header name

语法

http
Sec-CH-UA-Arch: <arch>

指令

<arch>

指示底层平台架构的字符串,例如 "x86""ARM""[arm64-v8a, armeabi-v7a, armeabi]" 等。

示例

服务器通过在响应客户端的某些请求时包含 Accept-CH 来请求 Sec-CH-UA-Arch 标头,并使用所需标头的名称作为令牌:

http
HTTP/1.1 200 OK
Accept-CH: Sec-CH-UA-Arch

客户端可以选择提供提示,并将 Sec-CH-UA-Arch 标头添加到后续请求中。例如,在基于 Windows X86 的计算机上,客户端可能会添加如下所示标头:

http
GET /GET /my/page HTTP/1.1
Host: example.site

Sec-CH-UA: " Not A;Brand";v="99", "Chromium";v="96", "Google Chrome";v="96"
Sec-CH-UA-Mobile: ?0
Sec-CH-UA-Platform: "Windows"
Sec-CH-UA-Arch: "x86"

请注意,即使服务器响应中未指定,低熵标头也会被添加到请求中。

规范

Specification
User-Agent Client Hints
# sec-ch-ua-arch

浏览器兼容性

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
Sec-CH-UA-Arch request header
Experimental

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.

参见