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

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome Full support YesEdge Full support YesFirefox Full support YesIE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes

Legend

Full support  
Full support

其他

文档标签和贡献者

此页面的贡献者: stuxu, Fiag, marsorsun, sunyanan891114, Simba.Lin, paranoidjk
最后编辑者: stuxu,