aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/http/headers/accept-ch-lifetime
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/http/headers/accept-ch-lifetime
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/http/headers/accept-ch-lifetime')
-rw-r--r--files/zh-cn/web/http/headers/accept-ch-lifetime/index.html71
1 files changed, 71 insertions, 0 deletions
diff --git a/files/zh-cn/web/http/headers/accept-ch-lifetime/index.html b/files/zh-cn/web/http/headers/accept-ch-lifetime/index.html
new file mode 100644
index 0000000000..99814cde07
--- /dev/null
+++ b/files/zh-cn/web/http/headers/accept-ch-lifetime/index.html
@@ -0,0 +1,71 @@
+---
+title: Accept-CH-Lifetime
+slug: Web/HTTP/Headers/Accept-CH-Lifetime
+translation_of: Web/HTTP/Headers/Accept-CH-Lifetime
+---
+<div>{{HTTPSidebar}}{{securecontext_header}}{{SeeCompatTable}}</div>
+
+<p>服务器设置<code><strong>Accept-CH-Lifetime</strong></code>标头以指定{{HTTPHeader("Accept-CH")}}标头值的持久性,该值指定客户端应在后续请求中包括哪些<a href="https://developer.mozilla.org/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="https://developer.mozilla.org/en-US/docs/Glossary/Client_hints">Client Hints</a>只能在安全源(通过TLS)上访问。所有安全的请求都应该持久化Accept-CH和Accept-CH-Lifetime头,以确保<a href="https://developer.mozilla.org/en-US/docs/Glossary/Client_hints">Client Hints</a>可靠地发送。</p>
+</div>
+
+<h2 id="语法">语法</h2>
+
+<pre class="syntaxbox">Accept-CH-Lifetime: &lt;age&gt;
+</pre>
+
+<h2 id="示例">示例</h2>
+
+<pre>Accept-CH: Viewport-Width, DPR
+Accept-CH-Lifetime: 86400
+</pre>
+
+<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-Lifetime")}}</p>
+
+<h2 id="参见">参见</h2>
+
+<ul>
+ <li>{{HTTPHeader("Accept-CH")}}</li>
+ <li>{{HTTPHeader("Vary")}}</li>
+</ul>
+
+<div class="ui-widget-content ui-draggable" id="haloword-lookup" style="position: relative;">
+<div id="haloword-title"><a class="haloword-button" id="haloword-pron" title="发音"></a>
+
+<audio id="haloword-audio"></audio>
+
+<div id="haloword-control-container"><a class="haloword-button" id="haloword-add" title="加入单词表"></a><a class="haloword-button" id="haloword-remove" title="移出单词表"></a><a class="haloword-button" id="haloword-close" title="关闭查询窗"></a></div>
+</div>
+
+<div id="haloword-content"></div>
+</div>
+
+<div class="ui-widget-content" id="haloword-lookup">
+<div id="haloword-title"><a class="haloword-button" id="haloword-pron" title="发音"></a>
+
+<audio id="haloword-audio"></audio>
+
+<div id="haloword-control-container"><a class="haloword-button" id="haloword-add" title="加入单词表"></a><a class="haloword-button" id="haloword-remove" title="移出单词表"></a><a class="haloword-button" id="haloword-close" title="关闭查询窗"></a></div>
+</div>
+
+<div id="haloword-content"></div>
+</div>