aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/http/headers/expires
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/expires
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/expires')
-rw-r--r--files/zh-cn/web/http/headers/expires/index.html79
1 files changed, 79 insertions, 0 deletions
diff --git a/files/zh-cn/web/http/headers/expires/index.html b/files/zh-cn/web/http/headers/expires/index.html
new file mode 100644
index 0000000000..0f64838744
--- /dev/null
+++ b/files/zh-cn/web/http/headers/expires/index.html
@@ -0,0 +1,79 @@
+---
+title: Expires
+slug: Web/HTTP/Headers/Expires
+tags:
+ - 缓存,头部,HTTP,响应,response
+translation_of: Web/HTTP/Headers/Expires
+---
+<div>{{HTTPSidebar}}</div>
+
+<div><code><strong>Expires</strong></code> 响应头包含日期/时间, 即在此时候之后,响应过期。</div>
+
+<div> </div>
+
+<p>无效的日期,比如 0, 代表着过去的日期,即该资源已经过期。</p>
+
+<p>如果在{{HTTPHeader("Cache-Control")}}响应头设置了 "max-age" 或者 "s-max-age" 指令,那么 <code>Expires</code> 头会被忽略。</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>
+ <tr>
+ <th scope="row">{{Glossary("Simple response header", "CORS-safelisted response-header")}}</th>
+ <td>yes</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="语法">语法</h2>
+
+<pre class="syntaxbox">Expires: &lt;http-date&gt;
+</pre>
+
+<h2 id="指南">指南</h2>
+
+<dl>
+ <dt>&lt;http-date&gt;</dt>
+ <dd>
+ <p>一个 HTTP-日期 时间戳</p>
+ </dd>
+</dl>
+
+<h2 id="示例">示例</h2>
+
+<pre>Expires: Wed, 21 Oct 2015 07:28:00 GMT</pre>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Title</th>
+ </tr>
+ <tr>
+ <td>{{RFC("7234", "Expires", "5.3")}}</td>
+ <td>Hypertext Transfer Protocol (HTTP/1.1): Caching</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<p class="hidden">本页面的兼容表格是由结构化数据生成的。 如果您想帮助我们完善,可以checkout <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> 然后给我们发送pull请求</p>
+
+<p>{{Compat("http.headers.Expires")}}</p>
+
+<h2 id="其他">其他</h2>
+
+<ul>
+ <li>{{HTTPHeader("Cache-Control")}}</li>
+ <li>{{HTTPHeader("Age")}}</li>
+</ul>