DevToolsmith

Expires Header

The Expires response header gives an absolute date after which the response is stale.

Type
Response header
Category
Caching
Defined in
RFC 9111

Syntax

Expires: <HTTP date>

How Expires works

The HTTP/1.0 way to set a cache lifetime. If the response also has Cache-Control: max-age (or s-maxage), Expires is ignored. An invalid date, such as 0, means “already expired”. Absolute dates depend on clocks being right, which is why max-age replaced it.

Examples

Expires at a fixed time
Expires: Thu, 01 Jan 2027 00:00:00 GMT
Already expired (common in legacy configs)
Expires: 0

Check it

curl -sI https://example.com | grep -i '^expires:'

Paste a full set of response headers into the HTTP header checker to get every header explained and common mistakes flagged.

Related headers

  • Cache-Control: tells browsers, CDNs and proxies whether a response may be stored, by whom, and for how long.
  • Age: tells how many seconds a response has spent in a cache (usually a CDN) since it was fetched from the origin.
  • Last-Modified: says when the resource was last changed, for revalidation and heuristic caching.

More caching headers

ETag , If-None-Match , If-Modified-Since , Vary .

Sources

Spotted a mistake? Email hello@devtoolsmith.com and we’ll fix it.

Frequently asked questions

What does the Expires header do?

The Expires response header gives an absolute date after which the response is stale. The HTTP/1.0 way to set a cache lifetime. If the response also has Cache-Control: max-age (or s-maxage), Expires is ignored. An invalid date, such as 0, means “already expired”. Absolute dates depend on clocks being right, which is why max-age replaced it.

How do I see the Expires header?

Run "curl -sI https://example.com" to print a response’s headers, or open the Network tab in your browser’s dev tools and select the request. Paste the headers into the HTTP header checker on this site to get each one explained.