From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/http/headers/expires/index.html | 79 +++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 files/zh-cn/web/http/headers/expires/index.html (limited to 'files/zh-cn/web/http/headers/expires') 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 +--- +
{{HTTPSidebar}}
+ +
Expires 响应头包含日期/时间, 即在此时候之后,响应过期。
+ +
 
+ +

无效的日期,比如 0, 代表着过去的日期,即该资源已经过期。

+ +

如果在{{HTTPHeader("Cache-Control")}}响应头设置了 "max-age" 或者 "s-max-age" 指令,那么 Expires 头会被忽略。

+ + + + + + + + + + + + + + + + +
Header type{{Glossary("Response header")}}
{{Glossary("Forbidden header name")}}no
{{Glossary("Simple response header", "CORS-safelisted response-header")}}yes
+ +

语法

+ +
Expires: <http-date>
+
+ +

指南

+ +
+
<http-date>
+
+

一个 HTTP-日期 时间戳

+
+
+ +

示例

+ +
Expires: Wed, 21 Oct 2015 07:28:00 GMT
+ +

规范

+ + + + + + + + + + + + +
SpecificationTitle
{{RFC("7234", "Expires", "5.3")}}Hypertext Transfer Protocol (HTTP/1.1): Caching
+ +

浏览器兼容性

+ + + +

{{Compat("http.headers.Expires")}}

+ +

其他

+ + -- cgit v1.2.3-54-g00ecf