aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/http/headers/accept-ch/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/http/headers/accept-ch/index.html')
-rw-r--r--files/zh-cn/web/http/headers/accept-ch/index.html57
1 files changed, 57 insertions, 0 deletions
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
+---
+<div>{{HTTPSidebar}}{{securecontext_header}}{{SeeCompatTable}}</div>
+
+<p><code><strong>Accept-CH</strong></code> 头由服务器设置,以指定客户端应在后续请求中应包含哪些客户端<a href="/en-US/docs/Glossary/Client_hints">Client Hints</a>提示头。</p>
+
+
+
+<table class="properties">
+ <tbody>
+ <tr>
+ <th scope="row">Header type</th>
+ <td>{{Glossary("Response header")}}</td>
+ </tr>
+ <tr>
+ <th scope="row">{{Glossary("Forbidden header name")}}</th>
+ <td>?</td>
+ </tr>
+ </tbody>
+</table>
+
+<div class="blockIndicator note">
+<p><strong>注意:</strong> <a href="/en-US/docs/Glossary/Client_hints">Client Hints</a>只能在安全源(通过TLS)上访问。所有安全的请求都应该持久化Accept-CH和Accept-CH-Lifetime头,以确保<a href="/en-US/docs/Glossary/Client_hints">Client Hints</a>可靠地发送。</p>
+</div>
+
+<h2 id="语法">语法</h2>
+
+<pre class="syntaxbox">Accept-CH: &lt;list of client hints&gt;
+</pre>
+
+<h2 id="例子">例子</h2>
+
+<pre>Accept-CH: DPR, Viewport-Width
+Accept-CH: Width
+Accept-CH-Lifetime: 86400
+Vary: DPR, Viewport-Width, Width
+</pre>
+
+<div class="blockIndicator note">
+<p><strong>注意:</strong>  牢记要根据所接受的Client Hints<a href="https://developer.mozilla.org/en-US/docs/Glossary/Client_hints#Varying_Client_Hints">更改响应</a>。</p>
+</div>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>
+
+<p>{{Compat("http.headers.Accept-CH")}}</p>
+
+<h2 id="相关内容">相关内容</h2>
+
+<ul>
+ <li>{{HTTPHeader("Accept-CH-Lifetime")}}</li>
+ <li>{{HTTPHeader("Vary")}}</li>
+</ul>