---
title: "Use shared dictionaries for big bundles · Agent Wranglers"
url: https://agentwranglers.se/playbook/website/performance/compression-dictionary-transport
updated: 2026-10-20
licence: "All rights reserved"
---

# Use shared dictionaries for big bundles

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Optional
- Chapter: [Performance](https://agentwranglers.se/playbook/website/performance)
- Rule: Use shared compression dictionaries only for bundles over 100 KB compressed that change at least monthly. Skip them otherwise.
- How: Serve `Use-As-Dictionary` on the old version of the bundle. Then serve the new version compressed against it with Brotli (`dcb`) or Zstandard (`dcz`), from the CDN or the build. Chromium browsers support it over HTTPS. Others fall back to plain Brotli, so no fallback code is needed.
- Check: In the browser's network panel, the new bundle shows `Content-Encoding: dcb` or `dcz`, and far fewer bytes than with Brotli alone.

Example:

```http
HTTP/1.1 200 OK
Content-Type: text/javascript
Use-As-Dictionary: match="/app.*.js"

GET /app.new.js HTTP/1.1
Available-Dictionary: :<base64 SHA-256 of the old file>:
Accept-Encoding: gzip, br, zstd, dcb, dcz

HTTP/1.1 200 OK
Content-Encoding: dcb
Vary: Accept-Encoding, Available-Dictionary
```

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers website playbook: https://agentwranglers.se/playbook/website/performance/compression-dictionary-transport`.

- Previous: [Fence off self-contained parts](https://agentwranglers.se/playbook/website/performance/css-containment)
- Next: [Report how long the server took](https://agentwranglers.se/playbook/website/performance/server-timing)
- [Performance](https://agentwranglers.se/playbook/website/performance)
