blob: adf9feae48e07fd7c2881766aad24182af70d3e2 (
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
74
75
76
77
|
---
title: Age
slug: Web/HTTP/Headers/Age
tags:
- Caching
- HTTP
- Response
- header
---
<div>{{HTTPSidebar}}</div>
<p><code><strong>Age</strong></code> 標頭代表資源進到代理快取後,經過了幾秒。</p>
<p><code>Age</code> 標頭通常接近 0。如果你拿到 <code>Age: 0</code> 代表資源剛剛才從後端伺服器抓進來;
不然通常會是快取當下與回應中 {{HTTPHeader("Date")}} 標頭的時間差。</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>no</td>
</tr>
</tbody>
</table>
<h2 id="Syntax">語法</h2>
<pre class="brush: html">Age: <秒數差>
</pre>
<h2 id="Directives">指令</h2>
<dl>
<dt><秒數差></dt>
<dd>
<p>正整數,代表資源在代理快取放幾秒了。</p>
</dd>
</dl>
<h2 id="Examples">範例</h2>
<pre>Age: 24</pre>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">Specification</th>
<th scope="col">Title</th>
</tr>
<tr>
<td>{{RFC("7234", "Age", "5.1")}}</td>
<td>Hypertext Transfer Protocol (HTTP/1.1): Caching</td>
</tr>
</tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</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="See_also">See also</h2>
<ul>
<li>{{HTTPHeader("Cache-Control")}}</li>
<li>{{HTTPHeader("Expires")}}</li>
</ul>
|