demo · v130
Shared CDT simulator
Edit a dictionary (the previous version) and the new resource. The page posts both to a local server route, measures real regular Brotli bytes plus a real dictionary-compressed payload, then shows the request/response headers Chrome and a server would negotiate for dcb/dcz.
Measured, with one honest caveat: the baseline Brotli and dictionary-compressed payload are produced by the server. Native JavaScript does not expose a Shared Brotli or Zstandard dictionary encoder, so the dcb result uses RFC 9842's 36-byte dcb header plus a real zlib dictionary-compressed payload as the local stand-in.
Dictionary (previous response, served once and cached)
New response (this fetch)
Waiting for measurement...
raw
0
bytes
regular Brotli
0
bytes
dictionary result
0
bytes (saving 0% vs Brotli)
request & response headers
the wire format
# 1. Server advertises that future responses can be encoded
# against a dictionary, by serving the dictionary once with:
Use-As-Dictionary: match="/app.*.js", id="v42"
# 2. On the next fetch, Chrome sends:
Available-Dictionary: :<sha-256 of dictionary>:
Accept-Encoding: gzip, deflate, br, zstd, dcb, dcz
# 3. Server responds with the diff:
Content-Encoding: dcb
Vary: accept-encoding, available-dictionary