DevKits

Caching · Response header

Age

How many seconds the response has been sitting in a shared cache.

What is Age?

The Age response header is a non-negative number of seconds that estimates how long the response has been held in a shared cache (a CDN or reverse proxy) since it was generated or revalidated at the origin. A fresh-from-origin response has Age: 0 (or no Age header); a value of Age: 300 means the cached copy is five minutes old. Clients combine Age with Cache-Control: max-age to compute the remaining freshness lifetime: time left ≈ max-age − Age.

Typical usage

Set automatically by CDNs and reverse proxies; you normally don't add it yourself. Its presence is a reliable signal that a response was served from an intermediary cache rather than freshly from the origin.

Examples

Cached for 24 seconds

Age: 24

With max-age, 60s of freshness left

Cache-Control: max-age=300
Age: 240

Common gotchas

A present Age header is the clearest way to tell a response came from a cache (vs the origin). If Age is greater than or equal to max-age, the cached copy is already stale. Age counts time in all caches along the path, so a high Age behind a multi-tier CDN is normal, not a bug.

Also known as

Also commonly written as: age header · http age header · response header age · cache age header · age response header. These variants — including plural forms, unhyphenated spellings, and Japanese (ヘッダ) — all refer to the same Age HTTP header.

Specification

RFC 9111 §5.1

Frequently asked questions

What is the Age HTTP header?

The Age response header is a non-negative number of seconds that estimates how long the response has been held in a shared cache (a CDN or reverse proxy) since it was generated or revalidated at the origin. A fresh-from-origin response has Age: 0 (or no Age header); a value of Age: 300 means the cached copy is five minutes old. Clients combine Age with Cache-Control: max-age to compute the remaining freshness lifetime: time left ≈ max-age − Age.

Is Age a request or response header?

Age is a response header — the server sends it to the client. Set automatically by CDNs and reverse proxies; you normally don't add it yourself. Its presence is a reliable signal that a response was served from an intermediary cache rather than freshly from the origin.

What does a Age header look like?

A typical Age header looks like: Age: 24 (Cached for 24 seconds).

What are common mistakes with Age?

A present Age header is the clearest way to tell a response came from a cache (vs the origin). If Age is greater than or equal to max-age, the cached copy is already stale. Age counts time in all caches along the path, so a high Age behind a multi-tier CDN is normal, not a bug.

Related headers

Work with this header

Read the HTTP Caching Guide → →