flâneur

Can I Compress (with Dictionaries)?

canicompress.com · 802 words · saved by 1 readers

Watch dictionary compression in action. JavaScript bundles compressed at the edge by Cloudflare using RFC 9842.

How it works Dictionary registration: The first JS bundle response includes a Use-As-Dictionary header with a URL match pattern and a dictionary-id. Cloudflare's edge injects this header and stores the response body as a dictionary keyed by its SHA-256 hash. The browser caches the decoded body and remembers the dictionary ID for future requests matching the pattern. New deploy arrives: A Worker cron creates a new bundle every minute with unique parameters at a unique URL. The browser sees the URL matches the stored dictionary's pattern and sends Available-Dictionary (the SHA-256 hash) and…

saved by

related reading