The Age response header conveys the sender’s estimate of the time since the response was generated or successfully validated at the origin server.
Syntax
The value is a non-negative integer representing time in seconds:
Age: 3600
In the example above, the response was generated 3,600 seconds (1 hour) ago and served from an intermediary cache.
How proxies calculate Age
According to RFC 9111 Section 5.1:
- When a response is generated directly by the origin server, the
Ageheader is typically0or omitted. - When served from an intermediary cache (CDN, reverse proxy), the cache calculates the elapsed time since generation and sets
Age.
Determining cache hits vs. misses
Age: 0or missing: Origin response (cache miss or dynamic bypass).Age: 120: CDN cache hit; content has been cached for 2 minutes.
How to inspect with curl
Observe Age and cache headers using curl:
curl -i https://api.example.test/v1/static/config.json
Key takeaway
The Age header indicates how many seconds a cached response has lived in intermediary caches. It is an essential diagnostic tool for verifying CDN cache hits and monitoring cache expiration relative to max-age.