v156 · Use-As-Dictionary · Available-Dictionary

Dictionary negotiation

The full handshake, one step at a time: advertise a dictionary with Use-As-Dictionary, let the browser store it, then request a matching URL and watch for Available-Dictionary, Dictionary-ID, and dcb/dcz in Accept-Encoding — read from a live server echo.

Requirements

Compression Dictionary Transport needs a secure context and the feature enabled: --enable-features=CompressionDictionaryTransport (shipped Chrome 130) plus the v156 alignment flags --enable-blink-features=CDTNewDestination,CDTNewCrossOriginHandling,CDTNewReferrerAndReferrerPolicyHandling. Dictionaries are stored per the response's caching headers, so the second request may need a moment after the first.

Walk the handshake

Runs three real fetches against the echo route: fetch the dictionary (it responds with Use-As-Dictionary), then fetch a matching target twice and inspect whether the browser offered the stored dictionary.
  1. 1 · Fetch the dictionary resource

    The server responds with Use-As-Dictionary so the browser can store it.

    not run

  2. 2 · Request a matching URL

    If the dictionary was stored and matches, the browser adds Available-Dictionary, Dictionary-ID, and dcb/dcz.

    not run

  3. 3 · What the server can send back

    With a matching dictionary offered, the server may respond Content-Encoding: dcb (Brotli delta) or dcz (Zstandard delta).

    not run

The headers, in order

# 1. Dictionary response
HTTP/1.1 200 OK
Use-As-Dictionary: match="/dict-echo/target*", id="demo-dict-v1", type="raw"
Cache-Control: max-age=3600

# 2. Later matching request (browser-generated)
GET /dict-echo/target
Available-Dictionary: :<sha-256 of the dictionary bytes>:
Dictionary-ID: "demo-dict-v1"
Accept-Encoding: gzip, br, zstd, dcb, dcz

# 3. Delta-compressed response
HTTP/1.1 200 OK
Content-Encoding: dcb

see also