Change two lines of code and ship a release, and the browser sees a new file hash and re-downloads the entire bundle—even though 99% of the bytes stayed identical. A similar inefficiency lived in styling: the engine stores widths as numbers, yet hands JavaScript a "240px" string to run through parseFloat().
Stable Firefox 161, released on November 24, 2026, fixes both issues and closes the gap with Chromium.
Randomness in CSS, Nested Functions, and Typed OM
Firefox now supports the CSS random() function, removing the need for JS when generating random card angles or animation delays. It picks a value from [min, max] with an optional step for lengths, angles, times, numbers, and percentages. The first <random-key> argument sets the seed: a key like --star-base syncs values across properties or elements, property-scoped and element-scoped control spread, and fixed <number> locks a number for debugging.
At the same time, var(), attr(), and env() now accept nested functions in their first argument.
.star {
/* Key --star-base syncs width and height in 5px steps */
width: random(--star-base, 10px, 50px, 5px);
height: random(--star-base, 10px, 50px, 5px);
rotate: random(property-scoped, 0deg, 360deg, 45deg);
}
.themed {
/* Variable name comes from a data attribute */
color: var(attr(data-theme-prop type(<custom-ident>)));
padding-block-start: env(var(--safe-area-block-start));
}
Can you ship random() to production today? Only with a fallback: MDN marks it as Limited availability, so guard it with @supports not (order: random(1, 2)).
Meanwhile, CSS Typed OM catches up to Chrome and Safari: Element.computedStyleMap() and HTMLElement.attributeStyleMap return style objects without string parsing. One shared caveat across all browsers: CSSColorValue and CSSRGB still don't work anywhere yet.
Dictionary Delta Compression, Clipboard, and Web APIs
The biggest networking win is Compression Dictionary Transport (RFC 9842). The server marks an old bundle with Use-As-Dictionary (or <link rel="compression-dictionary">). When requesting a new version, the browser sends the dictionary's SHA-256 hash in Available-Dictionary along with dcb/dcz (Brotli/Zstd) in Accept-Encoding, and the server responds with a small delta.
# 1. Mark the current bundle (app.v1.js) as a dictionary:
Use-As-Dictionary: match="/js/app.*.js"
# 2. Request for app.v2.js carries the dictionary hash and dcb/dcz:
Accept-Encoding: gzip, br, zstd, dcb, dcz
Available-Dictionary: :pZGm1Av0IEBKARczz7exkNYsZb8LzaMrV7J32a2fFG4=:
# 3. Delta response with required Vary header for caching:
Content-Encoding: dcb
Vary: accept-encoding, available-dictionary
Without Vary, a CDN could serve a delta to a client that lacks the dictionary. The standard already works in Chrome/Edge 130+ and now Firefox 161 (not yet in Safari). Strict rules apply: HTTPS and same-origin only (to prevent CRIME/BREACH attacks), disabled behind TLS proxies, and disallowed with no-store/no-cache.
The Clipboard API adds custom same-origin formats prefixed with "web " for web editors, and the Navigation API adds NavigationTransition.to for error diagnostics.
// CSS Typed OM: read width as { value, unit }
const width = el.computedStyleMap().get("width");
// Clipboard API: write a custom same-origin "web ..." format
const type = "web application/x-my-node";
const blob = new Blob([JSON.stringify({ id: 42 })], { type });
await navigator.clipboard.write([new ClipboardItem({ [type]: blob })]);
// Navigation API: inspect the failed target URL outside navigate
navigation.addEventListener("navigateerror", () => {
console.error("Navigation failed at:", navigation.transition?.to?.url);
});
Other stable additions: SVG <image>, <script>, and <feImage> now support referrerpolicy, WebRTC RTCRtpSender.setParameters() requests a keyframe right away, and WebDriver BiDi received five fixes.
What Is Testing Behind Flags in Nightly
Several features already sit in the 161 codebase, active in Nightly and toggleable via about:config:
| Feature | about:config flag | What it does |
|---|---|---|
margin-trim (block) | layout.css.margin-trim.enabled | Trims edge margins at container boundaries |
| MPA View Transitions | dom.viewTransitions.cross-document.enabled | Animates transitions between separate pages |
blocking="render" | dom.element.blocking.enabled | Blocks first render until a resource loads |
quotes: match-parent and text-autospace-size are in there too. For everyday layout work, the three in the table stand out: margin-trim eliminates :first-child/:last-child hacks, while MPA View Transitions with blocking="render" already run in Chromium and give multi-page sites SPA-like smoothness.

