Browser.cache.memory.capacity [90% BEST]

In the ecosystem of web browsers, speed is the ultimate currency. While modern browsers are remarkably fast out of the box, there remains a class of power users and system administrators who refuse to accept "good enough." For these users, Mozilla Firefox offers a gateway to granular control via the about:config interface.

Among the hundreds of hidden preferences lies a particularly powerful, yet often misunderstood, integer value: browser.cache.memory.capacity .

This article explores what this preference does, how it interacts with the browser's multi-layered caching architecture, how to optimize it for different hardware configurations, and why you might (or might not) want to change it.

| Value | Meaning | |-------|---------| | -1 | Default (recommended). Firefox automatically manages the cache. | | 0 | Disabled. No memory caching. Drastically slows down session navigation. | | 65536 (64 MB) | Conservative fixed limit. | | 131072 (128 MB) | Moderate fixed limit. | | 262144 (256 MB) | High fixed limit (rarely needed). | Browser.cache.memory.capacity

To revert to automatic management, simply set the value back to -1. If you created the preference, you can right-click it and select Reset.

Scenario: You are running Firefox on a legacy system with 4GB of RAM. You also run a Virtual Machine, Adobe Photoshop, or a local development server (Docker, Node). Every megabyte matters.

Outcome: A large memory cache will cause the operating system to swap memory to the page file on disk. Once swapping begins, performance collapses. In this context, a restrictive memory cache forces Firefox to be "neighborly" to other processes. In the ecosystem of web browsers, speed is

Recommended value: 51200 (50 MB) or 25600 (25 MB). Alternatively, leaving it at -1 often works, but manual caps can prevent aggressive caching spikes.

Firefox uses a heuristic algorithm when browser.cache.memory.capacity = -1:

The automatic mode is safe, conservative, and works for 95% of users. However, "safe" does not always mean "optimal." The automatic mode is safe, conservative, and works


On Linux distributions with limited RAM, you might want to completely bypass memory caching to free RAM for the kernel's filesystem cache. Set to 0 or 8192 (8 MB).


Changing the preference is one thing. Verifying it is another.

Adjusting this setting involves balancing resource consumption against responsiveness.