Expires
响应头包含日期/时间, 即在此时候之后,响应过期。无效的日期,比如 0, 代表着过去的日期,即该资源已经过期。
如果在Cache-Control
响应头设置了 "max-age" 或者 "s-max-age" 指令,那么 Expires
头会被忽略。
Header type | Response header |
---|---|
Forbidden header name | no |
CORS-safelisted response-header | yes |
语法
Expires: <http-date>
指南
- <http-date>
-
一个 HTTP-日期 时间戳
示例
Expires: Wed, 21 Oct 2015 07:28:00 GMT
规范
Specification | Title |
---|---|
RFC 7234, section 5.3: Expires | Hypertext Transfer Protocol (HTTP/1.1): Caching |
浏览器兼容性
BCD tables only load in the browser
本页面的兼容表格是由结构化数据生成的。 如果您想帮助我们完善,可以checkout https://github.com/mdn/browser-compat-data 然后给我们发送pull请求