---
title: "Tab Unloading in Firefox 93"
description: "Firefox 93 on Windows unloads memory-heavy background tabs in least-recently-used order when system memory is critically low, keeping them in the tab bar and restoring scroll position and form data on reselect."
url: "https://swe.quest/articles/tab-unloading-in-firefox-93-01f43dc391aafc23"
canonical: "https://hacks.mozilla.org/2021/10/tab-unloading-in-firefox-93/"
source: "Mozilla Hacks"
published: "2021-10-05"
difficulty: "medium"
kind: "Deep dive"
reading_minutes: 6
tags: ["browsers","memory-management","resilience"]
---

# Tab Unloading in Firefox 93

A post on [Mozilla Hacks](https://swe.quest/sources/mozilla-hacks.md), published 2021-10-05, 6 min read, Deep dive. Original: [https://hacks.mozilla.org/2021/10/tab-unloading-in-firefox-93/](https://hacks.mozilla.org/2021/10/tab-unloading-in-firefox-93/)

## Summary

Firefox 93 on Windows unloads memory-heavy background tabs in least-recently-used order when system memory is critically low, keeping them in the tab bar and restoring scroll position and form data on reselect. Detection pairs a Windows low-physical-memory notification (CreateMemoryResourceNotification) with periodic checks of available commit space against a configurable threshold, because Windows does not overcommit and allocations fail once commit space runs out, even with free physical RAM. A month-long Nightly experiment showed fewer overall crashes and longer sessions, but higher average memory use (explained by survivorship bias) and a larger share of OOM crashes, possibly because unloading a tab needs a JavaScript GC pass that itself requires memory. Pinned tabs and tabs playing audio, using picture-in-picture or WebRTC are deprioritized, and a new about:unloads page exposes the ordering.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Browsers](https://swe.quest/tags/browsers.md) (Web & mobile)
- [Memory management](https://swe.quest/tags/memory-management.md) (Compilers & runtimes)
- [Resilience](https://swe.quest/tags/resilience.md) (Distributed systems)

## Prerequisites

- virtual memory and swap
- Windows commit charge

## Keywords

Firefox, Windows, CreateMemoryResourceNotification, about:unloads, tabs.discard, WebExtensions

## Related posts

- [Improving Firefox stability with this one weird trick](https://swe.quest/articles/improving-firefox-stability-with-this-one-weird-trick-6dcdeb9550eeb654.md): Mozilla Hacks · 2022-11-22 · Medium · 4 min read · Memory management, Operating systems, Browsers, Resilience
  Out-of-memory crashes on Windows are often caused by exhaustion of commit space rather than physical RAM, since Windows forbids overcommit and graphics drivers commit memory for texture backing that is rarely used.
- [Debugging JavaScript Memory Leaks](https://swe.quest/articles/debugging-javascript-memory-leaks-440c20d303c4be9c.md): Bun · 2025-04-02 · Medium · 8 min read · Memory management, Debugging, JavaScript, Runtimes & VMs
  Bun implements V8's writeHeapSnapshot API, so heap snapshots can be loaded and diffed in Chrome DevTools, where a steadily growing Delta column reveals leaks. bun:jsc's heapStats also reports per-type object counts, including objects protected from GC.
- [MemLab: An open source framework for finding JavaScript memory leaks](https://swe.quest/articles/memlab-an-open-source-framework-for-finding-javascript-memory-leaks-d413135b7aeb2d8e.md): Meta Engineering · 2022-09-12 · Medium · 11 min read · Memory management, JavaScript, Frontend, React, Debugging
  MemLab finds JavaScript memory leaks by driving a headless browser with Puppeteer through a navigate-away/target/return sequence, then diffing heap snapshots as (SB \\ SA) ∩ SA' to find objects that should have been freed.
- [Improving Firefox responsiveness on macOS](https://swe.quest/articles/improving-firefox-responsiveness-on-macos-b8cb4da3ea0ad313.md): Mozilla Hacks · 2022-10-10 · Hard · 6 min read · Concurrency, Memory management, Performance engineering, Operating systems, C & C++
  Firefox 103 on macOS became much more responsive under load after its customized jemalloc allocator stopped using the deprecated OSSpinLock, which spins and yields in user space and can nearly live-lock on busy systems.
- [Bun v1.2.2](https://swe.quest/articles/bun-v1-2-2-430cc9d4f8048e2e.md): Bun · 2025-02-01 · Medium · 8 min read · JavaScript, Runtimes & VMs, Memory management
  Bun v1.2.2 fixes 38 bugs and cuts idle JavaScript memory usage by 10–30% (28% for Next.js, 11% for Elysia).

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
