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: 1250This 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
Ageinherited from an upper tier. Cloudflare documents this, soAgecan be older than the last local fill. - Cloudflare sets
AgeonHIT,STALEandUPDATINGresponses, and not onMISS,DYNAMICorBYPASS.
Related terms
References
- RFC 9111: HTTP Cachinghttps://www.rfc-editor.org/rfc/rfc9111
- MDN: Agehttps://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Age
- 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.