From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/http/headers/accept-ch/index.html | 57 +++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 files/zh-cn/web/http/headers/accept-ch/index.html (limited to 'files/zh-cn/web/http/headers/accept-ch') diff --git a/files/zh-cn/web/http/headers/accept-ch/index.html b/files/zh-cn/web/http/headers/accept-ch/index.html new file mode 100644 index 0000000000..ded134ff4d --- /dev/null +++ b/files/zh-cn/web/http/headers/accept-ch/index.html @@ -0,0 +1,57 @@ +--- +title: Accept-CH +slug: Web/HTTP/Headers/Accept-CH +translation_of: Web/HTTP/Headers/Accept-CH +--- +
{{HTTPSidebar}}{{securecontext_header}}{{SeeCompatTable}}
+ +

Accept-CH 头由服务器设置,以指定客户端应在后续请求中应包含哪些客户端Client Hints提示头。

+ + + + + + + + + + + + + + +
Header type{{Glossary("Response header")}}
{{Glossary("Forbidden header name")}}?
+ +
+

注意: Client Hints只能在安全源(通过TLS)上访问。所有安全的请求都应该持久化Accept-CH和Accept-CH-Lifetime头,以确保Client Hints可靠地发送。

+
+ +

语法

+ +
Accept-CH: <list of client hints>
+
+ +

例子

+ +
Accept-CH: DPR, Viewport-Width
+Accept-CH: Width
+Accept-CH-Lifetime: 86400
+Vary: DPR, Viewport-Width, Width
+
+ +
+

注意:  牢记要根据所接受的Client Hints更改响应

+
+ +

浏览器兼容性

+ + + +

{{Compat("http.headers.Accept-CH")}}

+ +

相关内容

+ + -- cgit v1.2.3-54-g00ecf