# Mozilla Firefox v161: dictionary transport, custom clipboard

Mozilla Firefox v161, released on November 24, supports Compression Dictionary Transport. A server marks a response as a dictionary, and later similar files arrive compressed against it. The Clipboard API also gains custom formats. Chrome and Edge already had both, and Safari has neither.

- Language: en
- Published: 2026-11-26
- Tags: dev, browser, web-standards, performance, firefox
- URL: https://devs7ud.io/en/trends/mozilla-firefox-v161-compression-dictionary-custom-clipboard-en
- Translation (ko): https://devs7ud.io/trends/mozilla-firefox-v161-compression-dictionary-custom-clipboard.md

## What changed in Firefox v161

Firefox is the web browser made by Mozilla. According to the MDN release notes for developers, Firefox v161 was released on November 24, 2026. Two changes matter most to people who build for the web.

- **Compression Dictionary Transport.** A previous version of a file can serve as the dictionary for compressing the next one. Files that change little between versions, such as JavaScript bundles, take fewer bytes to transfer.
- **Custom clipboard formats.** A web app can write and read its own data format on the clipboard, named with a `web ` prefix.

The CSS `random()` function and CSS Typed OM arrived in the same release.

Chrome and Edge already had both headline features. With Firefox on board, more of your visitors benefit when you adopt them.

![The HTTP entry in the MDN release notes for Firefox 161: Compression Dictionary Transport is now supported, and a server can mark a response as a dictionary using the Use-As-Dictionary header](/blog-img/mozilla-firefox-v161-compression-dictionary-custom-clipboard/mdn-http.png "zoom")

_Image: [MDN, Firefox 161 release notes for developers](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/161)_

## The previous version as the dictionary

HTTP compression shrinks a file by keeping one copy of each repeated string and replacing the rest with references. Brotli and Zstandard go further with a dictionary of commonly seen strings. A string that is in the dictionary does not have to be in the compressed file at all. Both algorithms ship with a default dictionary.

Compression Dictionary Transport lets a site provide its own dictionary. The MDN guide walks through this example.

- A site uses `my-library.v1.js` and then updates to v2. Most of the code is the same in both.
- The site tells the browser to use v1, which it already has, as the dictionary for v2.
- Strings common to both versions do not need to be sent again. Most of the download for v2 is then the difference between the two versions.

Using a previous version as the dictionary is called delta compression. MDN says the technique can achieve an order of magnitude more compression than a default built-in dictionary.

![A diagram with app.v1.js above app.v2.js, where only a yellow delta piece travels to the browser, under a Use-As-Dictionary header](/blog-img/mozilla-firefox-v161-compression-dictionary-custom-clipboard/delta.png)

_Image: devs7udio, a diagram of keeping the previous version as a dictionary and sending only what changed_

What MDN says about the dictionary itself:

- **Format.** It is a regular file with no specific format and no specific MIME type.
- **Separate dictionary.** You can also collect common strings, such as your HTML templates, into a dictionary file of its own.
- **Binary files.** Dictionaries work for binary formats such as WASM as well.

An earlier attempt at the same idea, SDCH, was never widely supported and was removed in 2017. The current approach is specified in RFC 9842.

## The headers between request and response

Compression Dictionary Transport runs on a handful of HTTP headers. The header values below are the examples from the MDN guide.

**Marking a dictionary and using it**

- Server → Browser
- Browser → Browser
- Browser → Server

**1. The server marks a response as a dictionary.** The `match` value is the URL pattern of the resources that may use it.

```http
Use-As-Dictionary: match="/js/app.*.js"
```

**2. The browser adds dictionary details to the next matching request.** `Available-Dictionary` is the SHA-256 hash of the stored dictionary. `dcb` and `dcz` say the browser accepts dictionary compression with Brotli or Zstandard.

```http
Accept-Encoding: gzip, br, zstd, dcb, dcz
Available-Dictionary: :pZGm1Av0IEBKARczz7exkNYsZb8LzaMrV7J32a2fFG4=:
```

**3. The server replies with a response compressed against the dictionary.**

```http
Content-Encoding: dcb
```

**4. A cacheable response includes a Vary header.** It keeps caches from serving the response to clients that do not support dictionary compression, or to clients holding a different dictionary.

```http
Vary: accept-encoding, available-dictionary
```

Two optional pieces:

- **Dictionary ID.** If `Use-As-Dictionary` carries an `id`, the browser sends it back in the `Dictionary-ID` header of later requests, which makes the dictionary file easier for the server to find. The server must still check the hash in `Available-Dictionary`.
- **Separate dictionary.** A dictionary that the page does not already download is announced with `<link rel="compression-dictionary">` or a `Link` header. The browser downloads it during idle time.

## Server and cache checks

The MDN guide lists several conditions to know before adopting this.

**Origin and security**

- A dictionary must be same-origin with the resource that uses it.
- A dictionary-compressed resource must be same-origin with the document or follow the CORS rules: requested with the `crossorigin` attribute and served with an appropriate `Access-Control-Allow-Origin` header.
- Dictionaries follow HTTP cache partitioning. Origins cannot share a dictionary even when they download the same file, so each origin downloads it again.
- On a site with a Content Security Policy, a separate dictionary loaded through `<link>` needs its location allowed by `connect-src`, or by `default-src` when `connect-src` is not set.
- Browsers may restrict the feature when cookies are disabled or extra privacy protections are on.

**How long a dictionary lives**

The `Cache-Control` header of the response that carries `Use-As-Dictionary` decides whether the browser stores the dictionary and for how long.

- A response sent with `no-store` or `no-cache` is never used as a dictionary.
- With `must-revalidate`, the dictionary lasts only as long as `max-age`. With `max-age=0`, it is never stored.
- HTML documents are often sent with `no-cache` or `max-age=0, must-revalidate`. Such a document cannot be the dictionary for its own next version.
- In that case the browser drops the dictionary without an error. It accepts the header, but later requests carry no `Available-Dictionary`.

**Creating the compressed files**

- Dictionary-compressed responses can be created per request, but MDN notes that for static resources it can be better to create them in advance at build time. The output is a `.dcb` or `.dcz` file.
- You need Brotli or Zstandard, plus OpenSSL. The commands are in the MDN guide.
- You have to decide whether to build deltas against the last version only or against the last several.

The MDN documents do not say whether a hosting service or CDN handles these headers and the compression for you. Check the documentation of the service you use.

## Your own data through copy and paste

The Clipboard API now supports custom formats. A custom format is a MIME type prefixed with `web ` (the word web followed by a space), such as `web text/x-my-format`. You write and read it with `Clipboard.write()` and `Clipboard.read()`.

MDN describes the use this way.

- A custom format can preserve information that a standard representation cannot, for example structured data alongside the visible version of the same content.
- An app that recognizes its own format pastes from it. Other apps receive whichever standard representations you also provide.
- The main use case is copying and pasting within your own application, in the same page or across tabs and browsers running it.

The Firefox release notes state that a custom format can only be read by a page that is same-origin with the page that wrote it.

![A clipboard holding a text/plain row, a text/html row and a yellow web text/x-app row](/blog-img/mozilla-firefox-v161-compression-dictionary-custom-clipboard/clipboard.png)

_Image: devs7udio, a diagram of a clipboard that holds two standard formats and one custom format_

The MDN example copies an inventory table. The screen shows item, quantity and SKU. The `text/html` version leaves out the SKU column, while the custom format carries the full data as JSON. The code below is a shortened version of that example.

```js
const customType = "web text/x-mdn-inventory+json";

// Write: always include the standard formats, add the custom one only when supported
const data = {
  "text/html": new Blob([html], { type: "text/html" }),
  "text/plain": new Blob([text], { type: "text/plain" }),
};
if (ClipboardItem.supports(customType)) {
  const json = JSON.stringify(inventory);
  data[customType] = new Blob([json], { type: customType });
}
await navigator.clipboard.write([new ClipboardItem(data)]);

// Read: use the custom format only when it is on the clipboard
const [clipboardItem] = await navigator.clipboard.read();
if (clipboardItem.types.includes(customType)) {
  const blob = await clipboardItem.getType(customType);
  const rows = JSON.parse(await blob.text());
}
```

Two points to keep from this code:

- **Writing.** Always include `text/html` and `text/plain`. Add the custom format only when `ClipboardItem.supports()` returns true.
- **Reading.** Read the custom format only when `clipboardItem.types` lists it, and fall back to a standard format otherwise.

For example, a block editor could carry block types and attributes in a custom format, a spreadsheet tool could carry cell formulas, and a design tool could carry the layer data of an element.

## In Chrome and Edge, not in Safari

| Feature | Chrome | Edge | Firefox | Safari |
| --- | --- | --- | --- | --- |
| Compression Dictionary Transport | v130 | v130 | v161 | Not supported |
| Custom clipboard formats | v104 | v104 | v161 | Not supported |
| CSS random\(\) | v156 | v156 | v161 | v26.2 |
| CSS Typed OM | v66 | v79 | v161 | v16.4 |

_Source: MDN compatibility data and the Firefox 161 release notes, checked on November 26, 2026, desktop browsers_

Notes for reading the table:

- **Compression Dictionary Transport in Firefox.** The MDN compatibility table still lists it as a preview. The v161 in this table comes from the release notes.
- **Experimental.** MDN marks Compression Dictionary Transport as an experimental technology.
- **Browsers without support.** They do not send `dcb` or `dcz` in the request, so they receive the usual compressed response.
- **Mobile browsers.** The table covers desktop browsers. Check the MDN compatibility table separately for mobile.

## The rest of the CSS and API changes

Other changes in the release notes.

**The CSS `random()` function.** It generates a random value within a range. A step size limits the result to increments of that step. A key lets several elements or properties share the same random base value.

```css
.box {
  rotate: random(0deg, 360deg);
  width: random(50px, 300px);
}
```

- **Nested functions.** `var()`, `attr()` and `env()` accept a function in their first parameter, as in `env(var(--safe-area-block-start))`.
- **CSS Typed OM.** `computedStyleMap()` and `attributeStyleMap` read and write CSS values as typed objects instead of strings. The color value interfaces are not supported.
- **Navigation API.** `NavigationTransition.to` exposes the destination of an ongoing navigation outside the `navigate` handler.
- **SVG.** The `referrerpolicy` attribute works on the `image`, `script` and `feImage` elements.

Some experimental features ship disabled by default: cross-document view transitions, `margin-trim`, `blocking="render"` and `text-autospace-size`.

## What a small site can try first

Interpretation: both features are progressive enhancements. A browser without support keeps the existing behavior, which makes them a low-risk experiment for a solo developer or a small team.

- **Compression Dictionary Transport fits sites that deploy often and ship large bundles.** The gain is largest where returning visitors download the whole bundle again after every release. Start by checking whether your bundle file names follow a rule that one `match` pattern can cover, and whether the bundle's `Cache-Control` lets the browser keep it as a dictionary.
- **Custom clipboard formats fit tools where people copy and paste inside the app a lot.** Editors, tables and canvases are the obvious ones. Always include the standard formats so that a paste into another app still carries the content.
- **Look at your share of Safari visitors first.** Safari has neither feature. A service with many Safari visitors gets a narrower benefit.

How many bytes you save depends on the site. The safe order is to apply it to one bundle, measure the transfer size yourself, and widen the scope after that.

## Sources

- [Firefox 161 release notes for developers](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/161) — MDN, released November 24
- [Compression Dictionary Transport](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Compression_dictionary_transport) — MDN HTTP guide
- [Use-As-Dictionary header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Use-As-Dictionary) — MDN HTTP header reference
- [Clipboard API](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API) — MDN Web API reference
- [random\(\) CSS function](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/random) — MDN CSS reference
- [Firefox 161.0 release notes](https://www.firefox.com/en-US/firefox/161.0/releasenotes/) — Mozilla, November 24
