aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/http/headers/age/index.html
blob: 409f142e7241e60ee89dccb5a161540d646dee1f (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
72
73
---
title: Age
slug: Web/HTTP/Headers/Age
tags:
  - 响应头
  - 缓存
  - 首部
translation_of: Web/HTTP/Headers/Age
---
<div>{{HTTPSidebar}}</div>

<p><code><strong>Age</strong></code> 消息头里包含对象在缓存代理中存贮的时长,以秒为单位。.</p>

<p>Age的值通常接近于0。表示此对象刚刚从原始服务器获取不久;其他的值则是表示代理服务器当前的系统时间与此应答中的通用头 {{HTTPHeader("Date")}} 的值之差。</p>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row">报头类型</th>
   <td>{{Glossary("Response header")}}</td>
  </tr>
  <tr>
   <th scope="row">{{Glossary("Forbidden header name")}}</th>
   <td>no</td>
  </tr>
 </tbody>
</table>

<h2 id="语法">语法</h2>

<pre class="syntaxbox">Age: &lt;delta-seconds&gt;
</pre>

<h2 id="指令">指令</h2>

<dl>
 <dt>&lt;delta-seconds&gt;</dt>
 <dd>
 <p>一个非负整数,表示对象在缓存代理服务器中存贮的时长,以秒为单位。</p>
 </dd>
</dl>

<h2 id="示例">示例</h2>

<pre>Age: 24</pre>

<h2 id="规范">规范</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">规范</th>
   <th scope="col">标题</th>
  </tr>
  <tr>
   <td>{{RFC("7234", "Age", "5.1")}}</td>
   <td>超文本协议 (HTTP/1.1): 缓存</td>
  </tr>
 </tbody>
</table>

<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.Age")}}</p>

<h2 id="参见">参见</h2>

<ul>
 <li>{{HTTPHeader("Cache-Control")}}</li>
 <li>{{HTTPHeader("Expires")}}</li>
</ul>