blob: 99814cde07f3d348f2d39da72d8f591727621d04 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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: <age>
</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>
|