demo · v142

Cache Variant Explosion

A CDN cache keyed on Available-Dictionary grows one variant per dictionary hash in the wild. Without a TTL, every dictionary ever shipped stays a valid cache key forever — your origin keeps generating delta variants for each one. ttl= is the surgical fix: it tells clients when to stop offering an old dictionary, so the variant set converges.

Simulate 8 weeks of deploys

dictionary live (within TTL) dictionary expired (TTL passed) variant served from cache
live variants
expired variants
peak set size
delta savings

Use-As-Dictionary header at deploy time

relevant markup

# When ttl is set, browsers stop sending Available-Dictionary
# after `ttl` seconds since the last fetch of the dictionary.
HTTP/1.1 200 OK
Content-Type: application/javascript
Use-As-Dictionary: match="/app-*.js", id="abc", ttl=1209600
Vary: Available-Dictionary, accept-encoding
Cache-Control: max-age=2592000

see also