{{HTTPSidebar}}
The Expires
header contains the date/time after which the response is considered stale.
Invalid dates, like the value 0, represent a date in the past and mean that the resource is already expired.
If there is a {{HTTPHeader("Cache-Control")}} header with the "max-age" or "s-max-age" directive in the response, the Expires
header is ignored.
Header type | {{Glossary("Response header")}} |
---|---|
{{Glossary("Forbidden header name")}} | no |
{{Glossary("Simple response header", "CORS-safelisted response-header")}} | yes |
Syntax
Expires: <http-date>
Directives
- <http-date>
-
An HTTP-date timestamp.
Examples
Expires: Wed, 21 Oct 2015 07:28:00 GMT
Specifications
Specification | Title |
---|---|
{{RFC("7234", "Expires", "5.3")}} | Hypertext Transfer Protocol (HTTP/1.1): Caching |
Browser compatibility
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
{{Compat}}
See also
- {{HTTPHeader("Cache-Control")}}
- {{HTTPHeader("Age")}}