The small number that describes an old document

Here is a small magic trick the Web performs every day. A policy page written three years ago, revalidated by its origin two minutes ago, can land in your browser wearing a header that reads Age: 120. Read it carelessly and you conclude the prose is two minutes old. Read it correctly and you understand the number has nothing to do with the prose at all.

HTTP Age is an estimate of the seconds since an origin generated or successfully validated a response. It is not the creation date of the resource, the document or the bytes that response represents. Ordinary speech gives “age” to objects. HTTP gives it to a response. The resource behind a URL may predate the Web server; the representation bytes may be unchanged through a hundred validations; the cache entry may have been replaced, updated or evicted. Age is a history of none of those things. It is a compact timing value for one specific cache calculation.

That was never decorative metadata. A cache needed to decide whether it could answer a new request with an earlier response without bothering the origin. To make that choice across several independently operated intermediaries, it needed an estimate that survived the hand-off from one cache to the next.

Before 1997, every cache started from zero

The 1996 HTTP/1.0 specification (RFC 1945) described caching, dates and expiration, but its defined response headers did not include Age. A recipient could see Date or Expires, use its own receipt time and apply local policy. It never received a standardized scalar carrying the time a response had already accumulated elsewhere.

That gap bites in a chain. Suppose cache A holds a response for 80 seconds and passes it to cache B. If B starts counting from zero, it grants the response a second youth. If B leans only on the origin’s wall-clock Date, clock skew can make the response look younger or older than it is. A common rule had to preserve elapsed time without assuming every machine shared a perfect clock.

HTTP/1.1 supplied that rule in 1997 (RFC 2068). Age travelled with a cached response as the sender’s estimate. The early specification drew the crucial boundary explicitly: after successful revalidation, age was based on the time of revalidation, not the original response. The field belonged to cache reuse, not archival chronology.

Two imperfect clocks, one conservative answer

A receiving cache could estimate initial age in two independent ways. First, compare the origin’s Date with the local time the response arrived:

apparent_age = max(0, response_time - date_value)

The maximum with zero stops a clock running ahead at the origin from producing negative age. This view uses two clocks and bends when they disagree.

Second, trust the Age value received from upstream and add the time the request-response exchange consumed:

response_delay = response_time - request_time

corrected_age_value = age_value + response_delay

This view never subtracts the origin clock from the cache clock, but it depends on upstream caches correctly inserting and updating Age. A path with older or defective implementations can understate what has already elapsed.

The conservative compatibility calculation takes the larger view:

corrected_initial_age = max(apparent_age, corrected_age_value)

Modern HTTP lets the corrected age value be used directly where obsolete caches that omit Age are not a concern. The historical maximum remains revealing. The protocol never pretended either observation was metaphysically true. It specified how a local implementation could combine evidence without electing one remote clock as sovereign.

Residence: the part only the local cache can see

Once the response was stored, the cache knew something no upstream actor could know in advance: how long this particular copy sat around before the next request.

resident_time = now - response_time

current_age = corrected_initial_age + resident_time

When the cache reused that response without validation, it did not append another age or keep a list of previous values. It generated one Age and replaced the field received from upstream with its computed current_age. The next cache inherited the result, added its observed response delay and later added its own residence.

The scalar accumulated duration while shedding route detail. It could say time had passed across transit and storage, but not where most of it passed. Two caches with long residence and ten caches with brief residence could emit the same number. The field carried no cache names, hop list, receipts or custody signatures. That is why it is useful and limited in the same breath: a downstream recipient can continue the arithmetic without obtaining every upstream log, but cannot reconstruct a provenance graph from the final integer.

Age is not freshness — and freshness is not a verdict

The most common misreading treats Age: 120 as either “fresh for 120 seconds” or “120 seconds remain.” It means neither. Age answers how much estimated time has elapsed. Freshness lifetime answers how long reuse without validation is permitted under the applicable cache rules.

The decision compares the two:

response_is_fresh = (freshness_lifetime > current_age)

The lifetime can come from a shared-cache s-maxage, a max-age, the interval between Expires and Date, or, where allowed, a heuristic derived from other response metadata. Origin policy supplies some inputs; the cache chooses and executes the rule. A current age of 120 seconds is fresh under a 300-second lifetime and stale under a 60-second lifetime.

Even “stale” is not a moral verdict on the bytes. It means the ordinary freshness comparison failed. Validation may freshen the stored response; applicable directives or disconnected-operation rules may permit stale reuse. Conversely, a young response is not automatically reusable if storage or request constraints forbid it. The number, the lifetime and the reuse policy are three separate layers.

Revalidation: same bytes, younger response

Suppose a cache stores a representation for a day, sends a conditional request and receives confirmation it remains valid. The underlying article can still be a day, a year or a decade old. The stored bytes may be identical. Yet the response’s cache age can be based on that successful validation.

This is not falsifying history. HTTP is answering an operational question: how long since the origin last generated or confirmed the response the cache proposes to reuse? The distinction lets a stable representation stay efficient without presenting the age field as a publication timestamp. It also sets an evidence boundary. A lower post-validation age does not prove the content changed; a higher age does not prove the origin is down. Age carries neither validator details nor the outcome record that justified updating stored metadata. Those facts must be observed separately.

What the header proves, and what it only seems to prove

Current HTTP permits a narrow inference: an Age field means the response is not first-hand; a cache generated it from stored state. The field alone does not reveal whether that cache validated with the origin during this request or relied on an earlier validation.

The converse is deliberately denied. A response without Age does not prove the origin was contacted. Older intermediaries might omit it; implementations can be non-compliant; an observer might see a transformed or incomplete record. Absence cannot be upgraded into a first-hand certificate.

The field is syntactically modest too: a non-negative integer in seconds. Invalid values should be ignored by a cache. If a delta-seconds value is too large to represent, or arithmetic overflows, modern specifications keep the historical saturation convention of 2147483648, or the greatest convenient positive integer. That sentinel is practical infinity, not evidence of an exactly measured 68-year cache stay.

The record worth keeping is bigger than the header

An operator explaining a cache incident needs more than the final emitted integer. The evidence should preserve the selected cache key and variant, the received Date and Age, request and response timestamps from the same local clock, every derived term, and the source of the freshness lifetime. It should record whether validation occurred, which status and validator metadata returned, and whether the decision path was fresh reuse, validated reuse, permitted stale reuse or failure.

Keeping only Age: 120 collapses several causes into one result. The same number might reflect inherited residence, transit delay, local storage or an apparent-age correction caused by clock difference. A graph that shows only the scalar can reveal a symptom, but it cannot allocate responsibility.

HTTP’s design avoided the opposite excess as well. It did not require a central chronology service through which every cache decision had to pass. The origin contributed Date, policy and validators. Each cache selected a stored response, measured local elapsed time, calculated current age and accepted the consequence of reuse. The next recipient could repeat the arithmetic.

The common field coordinated. It did not rule. Its authority extended only to an estimate that running implementations could consume, check against other inputs and replace. That is why the number survived: small enough to move through the network, narrow enough never to become the object’s identity.

Sources