- On the first visit, the server sends
Use-As-Dictionary: match="/dict/app.*.js" with the JS bundle. The browser caches it as a compression dictionary. - On the next request matching that pattern, the browser sends
Available-Dictionary: :sha256-hash:. - The Worker checks the hash against its manifest, finds the pre-generated DCB (Dictionary-Compressed Brotli) file, and responds with
Content-Encoding: dcb. - The browser decompresses using the cached dictionary. Transfer size drops from ~273KB to ~7KB — a 97% reduction.
The entire protocol runs in userspace on Cloudflare Workers. No platform changes required.
This demo shows a best-case scenario: v1 and v2 share 99%+ of their code (the ECharts library). Real-world savings depend on how much changes between deploys — apps that ship small updates over a large shared framework benefit the most.
RFC 9842: Compression Dictionary Transport