Expires 响应标头包含响应应被视为过期的日期/时间。
无效的日期(比如 0)代表过去的日期,即该资源已经过期。
[!NOTE] 如果响应中有指令为
max-age或s-maxage的 Cache-Control 标头,则Expires标头会被忽略。
<table class="properties"> <tbody> <tr> <th scope="row">标头类型</th> <td>Response header</td> </tr> <tr> <th scope="row">Forbidden header name</th> <td>否</td> </tr> <tr> <th scope="row"> CORS-safelisted response header </th> <td>是</td> </tr> </tbody> </table>
语法
Expires: <http-date>
指令
- <http-date>
- : HTTP 日期时间戳。
示例
Expires: Wed, 21 Oct 2015 07:28:00 GMT
规范
浏览器兼容性
参见
- Cache-Control
- Age
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
