// http header · caching header

Age

Seconds the object has been in a proxy cache

What the Age header does

Age is how many seconds a response has been sitting in a proxy/CDN cache. Combined with max-age, it tells the client how much freshness is left before the cached copy must be revalidated.

Example

Age: 24

Age in practice

Cached by a CDN

Cache-Control: public, max-age=3600
Age: 1240

Common Age questions and problems

What does Age: 0 mean?

The response was just fetched from the origin or was generated or revalidated an instant ago. Larger values show how many seconds the copy has been held in a cache.

How do I tell how long until it is stale?

Subtract Age from the freshness lifetime. With Cache-Control: max-age=600 and Age: 120, the response is fresh for about 480 more seconds.

Who sets Age?

Shared caches such as CDNs and proxies add it. Origin servers normally do not send it.

Age vs related headers

  • Cache-Control: Cache-Control sets the freshness lifetime. Age tells you how much of it is already used.
  • Access-Control-Max-Age: A different mechanism: it caches CORS preflight results, not responses.
  • Expires: Expires gives an absolute expiry time; Age reports elapsed time in cache.

Where it's used

Age is a caching header. Caching headers control how browsers and proxies store and reuse responses.

Other caching headers