Expires
ResponseActiveThe Expires header gives an explicit date/time after which the response is considered stale. It is the HTTP/1.0 caching mechanism, superseded by Cache-Control: max-age in HTTP/1.1. When both Expires and Cache-Control: max-age are present, Cache-Control takes precedence. Expires: 0 or a past date means 'do not cache'.
Expires: <day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT
Description
Expires predates Cache-Control and is less precise – it requires synchronized clocks between client and server. A skewed system clock can cause Expires to be misinterpreted. Cache-Control: max-age (a relative duration in seconds) is immune to clock skew. Expires remains useful for backwards compatibility with HTTP/1.0 caches and as a human-readable indicator of expiry time.
Examples
Cache until date
http
HTTP/1.1 200 OK
Expires: Thu, 01 Jan 2027 00:00:00 GMT
Cache-Control: max-age=31536000, publicDisable caching
http
HTTP/1.1 200 OK
Expires: 0
Cache-Control: no-cache, no-store