Skip to main content
sitewarm
HTTP caching headers

What is the Age header?

Age is the number of seconds since the origin generated or revalidated a response. A cache sets it; 0 or no Age usually means it came from origin.

Age is an HTTP response header, set by caches, that gives the number of seconds since the response was generated or last revalidated by the origin. A downstream cache compares it with `max-age` to work out how much freshness is left. A response straight from the origin usually has no Age or Age: 0.

HTTP/1.1 200 OK
Cache-Control: max-age=3600
Age: 1250

This response has 2350 seconds of freshness left for the next cache that stores it. Age is a clue, not a verdict. A `Cache-Status` or vendor header says directly whether the response was a hit or a miss.

  • With tiered caching, a hit at an edge can carry an Age inherited from an upper tier. Cloudflare documents this, so Age can be older than the last local fill.
  • Cloudflare sets Age on HIT, STALE and UPDATING responses, and not on MISS, DYNAMIC or BYPASS.

References

  1. RFC 9111: HTTP Cachinghttps://www.rfc-editor.org/rfc/rfc9111
  2. MDN: Agehttps://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Age
  3. Cloudflare: Cache responseshttps://developers.cloudflare.com/cache/concepts/cache-responses/

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.