Skip to main content
sitewarm
HTTP caching headers

What is the Expires header?

Expires gives a date after which a response is stale. It predates Cache-Control, and caches ignore it whenever max-age or s-maxage is present.

Expires is an HTTP response header that gives the date and time after which the response is stale. It predates `Cache-Control`. RFC 9111 says a cache must ignore Expires when the response also has a max-age directive, and a shared cache must ignore it when s-maxage is present. An invalid date, such as 0, means already expired.

Expires: Wed, 21 Oct 2026 07:28:00 GMT

Because it is an absolute date, it depends on the clocks of the origin and the cache agreeing. A relative `max-age` avoids that problem, which is why modern responses rely on it.

  • A shared cache gives `s-maxage` priority over both max-age and Expires.
  • With neither header, a cache may assign a heuristic freshness lifetime, often based on `Last-Modified`.
  • Cloudflare caches a response whose Expires is in the future, according to its default cache behavior.

References

  1. RFC 9111: HTTP Cachinghttps://www.rfc-editor.org/rfc/rfc9111
  2. Cloudflare: Default cache behaviorhttps://developers.cloudflare.com/cache/concepts/default-cache-behavior/

Warm your cache after every deploy

sitewarm requests the pages in your sitemap after a deploy and reports the cache state the CDN returns for each one, with the vantage point it was measured from.