How to Move Firefox Disk Cache Into System RAM

This article provides a step-by-step guide on how to move the Mozilla Firefox disk cache directly into your system RAM. By adjusting advanced configuration settings—specifically by disabling browser.cache.disk.enable and configuring browser.cache.memory.capacity—you can increase browser responsiveness and reduce unnecessary write wear on your Solid State Drive (SSD).

Step 1: Access the Firefox Configuration Editor

To change how Firefox handles caching, you need to access its advanced configuration page.

  1. Open the Firefox Web Browser.
  2. Type about:config into the address bar and press Enter.
  3. Click the Accept the Risk and Continue button on the warning page that appears.

Step 2: Disable the Disk Cache

Next, you must stop Firefox from writing cached files to your hard drive or SSD.

  1. In the Search preference name box at the top of the about:config page, type or paste browser.cache.disk.enable.
  2. Locate the preference in the list. Its default value is set to true.
  3. Double-click the row, or click the Toggle icon on the right side of the screen, to change the value to false.

Step 3: Verify Memory Cache is Active

Before allocating RAM, ensure that the memory cache itself is turned on.

  1. In the search box, type browser.cache.memory.enable.
  2. Ensure the value is set to true. If it is set to false, double-click it to change it to true.

Step 4: Configure the Memory Cache Capacity

Now you will define how much system RAM Firefox is allowed to use for its cache.

  1. In the search box, type or paste browser.cache.memory.capacity.
  2. If the preference already exists, click the Edit (pencil) icon on the right.
  3. If the preference does not exist, select the Number radio button below the search result, then click the Add (plus) icon on the right.
  4. Enter the amount of RAM you wish to allocate in Kilobytes (KB). Use the following values as a reference based on your available system memory:
    • -1: Allows Firefox to automatically manage the cache size based on your total installed RAM (Default).
    • 262144: Allocates 256 MB of RAM.
    • 524288: Allocates 512 MB of RAM.
    • 1048576: Allocates 1 GB of RAM.
  5. Click the Save (checkmark) icon or press Enter to apply the value.

Step 5: Restart Firefox

Close all open Firefox windows and relaunch the browser. Your browsing cache will now operate exclusively in your system RAM, clearing itself automatically whenever you close the browser or shut down your computer.