Browser.cache.memory.capacity [verified]

The setting browser.cache.memory.capacity is a "hidden" configuration in Mozilla Firefox

7. Conclusion

browser.cache.memory.capacity is a powerful configuration tool that gives users granular control over how their browser utilizes system memory. While it was a critical tweak in older versions of browsers, modern automatic memory management has made manual adjustment largely unnecessary. Incorrect configuration (such as setting it to 0) can severely degrade browser performance. Therefore, modification is recommended only for advanced users with specific hardware constraints or performance goals. Browser.cache.memory.capacity

Effects of adjusting browser.cache.memory.capacity The setting browser

Instructs the browser to dynamically determine the optimal cache size based on the total available system RAM. Specific Integer: Do not change this setting

Profile 1: The Power User with Expansive RAM

Scenario: You have 32 GB or 64 GB of RAM. You run Firefox, a few tabs, and nothing else. Firefox’s automatic mode gives you only 128 MB of memory cache, leaving 99% of your RAM idle.

Disables memory caching entirely, forcing the browser to rely on disk cache or constant network requests. mozillaZine Performance vs. Resource Management

  • Do not change this setting. Modern Firefox uses sophisticated algorithms to manage memory far better than manual static limits. The default value of -1 is optimized for stability and speed.

| Desired Cache Size | Value in KB | Use Case | | :--- | :--- | :--- | | Disabled (No memory cache) | 0 | Debugging / ultra-low RAM devices | | Very Small (8 MB) | 8192 | Legacy systems with 1-2 GB RAM | | Default Dynamic | -1 | Recommended for most users | | Small (32 MB) | 32768 | Systems with 2-4 GB RAM | | Moderate (64 MB) | 65536 | Systems with 4-8 GB RAM | | Large (128 MB) | 131072 | Systems with 8-16 GB RAM | | Extreme (256 MB) | 262144 | Systems with 16-32 GB RAM | | Insanity (512 MB) | 524288 | Systems with 32 GB+ RAM and specific workflows |

The Three Cache Layers

  1. Memory Cache (RAM): This is the fastest cache layer. RAM is hundreds of times faster than even the best NVMe SSDs. Firefox stores parsed scripts, CSS rules, and images that it expects to need immediately during the current session.
  2. Disk Cache (Hard Drive/SSD): This is a larger, slower persistent cache. Assets stored here survive browser restarts. When you revisit a website tomorrow, Firefox loads resources from your disk cache.
  3. Network (The Internet): The slowest layer. If an asset isn’t in memory or on disk, Firefox must fetch it from the web server.