shiichan

Meet Shared Dictionaries: compression that ships only the diff!

Hey there, it's me! Today it's all about compression, and specifically the clever idea of "let's stop resending the whole thing." I'm excited!

Cloudflare Blog blog.cloudflare.com

What was announced?

The Cloudflare Blog announced support for Shared Dictionaries compression, formally known as Compression Dictionary Transport (RFC 9842).

The idea: the browser uses a version it has already cached as a dictionary (think of it as a cheat sheet), and the server sends only the difference against the new response. Cloudflare is rolling this out in three phases, and Phase 1 beta starts on April 30, 2026.

The story so far

Until now, gzip, Brotli, and Zstandard all compressed each response on its own. They had no idea what the client already had cached, so they compressed from scratch every single time.

And web pages have kept getting heavier over the last decade, growing about 6-9% per year. On top of that, AI-assisted development means we deploy more often, so even when almost nothing in the code changed, a redeploy makes everyone re-download the whole asset. All that lovely caching goes to waste.

What changes

With Shared Dictionaries, only what actually changed (the delta) goes over the wire. Fix a single line in a 500 KB bundle, and you might send just a few kilobytes.

Here is Cloudflare's lab measurement (from a San Jose PoP to an origin in Council Bluffs, Iowa):

  • Uncompressed asset: 272 KB
  • gzip: 92.2 KB (66% smaller)
  • DCZ with a shared dictionary: 2.6 KB (99% smaller than uncompressed, 97% smaller than gzip)

Download-completion time shrank too, from 161 ms down to 1 ms on a cache miss.

This really pays off in the agentic web. As of March 2026, agentic crawlers and bots made up nearly 10% of Cloudflare's network requests, up 60% year over year. Cutting the waste of "nothing changed but everything gets re-fetched" is a big deal.

Dive Deep

Here is how it works. The server attaches a Use-As-Dictionary response header to a versioned asset. The browser caches it and, on the next request, sends an Available-Dictionary header to say "I already have this." The server then uses the old version as a dictionary and returns only the delta with a dcb or dcz content-encoding. The MDN guide explains the headers and encodings nicely.

Shared dictionaries were actually tried before. Google shipped SDCH in Chrome back in 2008, but it was vulnerable to compression side-channel attacks like CRIME and BREACH and violated the Same-Origin Policy, so it was unshipped in 2017. The new RFC 9842 closes those gaps by enforcing same-origin-only dictionaries. On the browser side, Chrome 130+ and Edge 130+ already support it, and Firefox is working on it.

The rollout has three phases:

  • Phase 1 (passthrough, beta April 30): Cloudflare just forwards the dictionary headers and encodings. Cache keys vary on Available-Dictionary and Accept-Encoding. Your origin has to serve the dictionary-compressed responses with the right headers.
  • Phase 2 (managed): Point to your assets with a rule, and Cloudflare handles adding Use-As-Dictionary, storing dictionary bytes, and delta-compressing versions. The demo Can I Compress (with Dictionaries)? shrinks a 94 KB bundle down to about 450 bytes (99.5% smaller).
  • Phase 3 (automatic): Cloudflare watches traffic and finds good delta-compression candidates on its own, no config needed, validating with signals like the RUM beacon.

One thing to watch: because responses vary on both encoding and dictionary hash, mid-deploy you get a mix of clients with the old dictionary, the new one, or none, which multiplies cache copies. You also need solid fallback logic for clients without a dictionary. Keep an eye on the changelog for updates.

Wrap-up

  • Cloudflare now supports Shared Dictionaries (Compression Dictionary Transport, RFC 9842), with the Phase 1 beta starting April 30.
  • The key idea is using a cached older version as a dictionary and sending only the delta, taking 272 KB down to 2.6 KB.
  • It runs on Use-As-Dictionary, Available-Dictionary, and the dcb/dcz encodings, and it's same-origin only to fix the old SDCH weaknesses.
  • A three-phase rollout eventually reaches fully automatic, config-free dictionaries.

If you're a frontend dev who deploys often, or you run a site serving assets to lots of bots and agents, this is a quietly delightful upgrade. If you want to trim transfer size and cost, go give it a look!