demo · v142
TTL vs Cache-Control max-age
A compression dictionary has two independent expiry levers: Cache-Control: max-age (controls when the browser re-fetches the response) and Use-As-Dictionary: ttl= (controls how long the response is eligible to be used as a dictionary). The shorter of the two wins. This page shows the overlap and which one limits the effective dictionary lifetime.
Lifetime timeline
Cache-Control max-age
Dictionary TTL
Usable as dictionary
Effective lifetime analysis
Cache-Control expires:
TTL expires:
Dictionary usable until:
Limiting factor:
Wasted TTL:
how the two interact
When Cache-Control: max-age expires first, the browser fetches a fresh copy — and a fresh copy may come without a Use-As-Dictionary header at all, discarding the old dictionary. When ttl= expires first, the response is still cached but the browser stops offering it as a dictionary in Available-Dictionary request headers. The minimum of the two is the effective dictionary lifetime.
HTTP/2 200 OK
Cache-Control: max-age=86400 ← 1 day until re-fetch
Use-As-Dictionary: ttl=604800 ← 7 days until dictionary expires
Effective dictionary lifetime = min(86400, 604800) = 86400 s (1 day)