Expires

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

Expires 响应标头包含响应应被视为过期的日期/时间。

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

备注: 如果响应中有指令为 max-ages-maxageCache-Control 标头,则 Expires 标头会被忽略。

标头类型 响应标头
禁止修改的标头
列入 CORS 安全名单的响应标头

语法

http
Expires: <http-date>

指令

<http-date>

HTTP 日期时间戳。

示例

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

规范

Specification
HTTP Caching
# field.expires

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Expires

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

参见