Sometimes I just feel that Firefox is such a memory hog. Once I start to open up a few extra tabs, it starts to slow down my whole system. Fortunately, you can do something about it. Here are simple tips and tricks to reduce firefox memory and cache consumption.
Tip 1: Reduce session history
browser.sessionhistory.max_entries determines the maximum number of pages in the browser’s session history, i.e. the maximum number of URLs you can traverse purely through the Back/Forward buttons. The Default value is 50. We usually won’t surf more than 5 of the websites we previously surfed before, and there is really no need to store more than that in the session which can clog up memory as they grow.
1. Open Firefox
2. Type about:config in the Firefox address bar
3. Press CTRL-F and search for browser.sessionhistory.max_entries
4. Double click on the value 50 (or whatever value is there currently) and change it to something lower such as 5.
5. Restart Firefox.
For Firefox 1.5 and above, you can also look at another configuration variable browser. sessionhistory. max_total_viewers which also determines the maximum number of content viewers to cache for “bfcache” (fast back/forward navigation). Default value is -1 (calculate based on available memory).
Set it to 0 so that no pages will be stored in memory.
set it to a number such as 5 to store only 5 pages in memory.
more info here
Tip 2: Reduce memory usage when minimize
1. Start up Firefox
2. Type in about:config in the address bar and hit Enter
3. Right click and choose New > Boolean
4. Type config.trim_on_minimize in the pop-up box and hit Enter
5. Select True and hit Enter.
6. Restart Firefox
Tip 3: Fixed cache capacity OR Disable Cache Totally
Every time new page is loaded, Firefox will cache the page so it doesn’t need to load again to be redisplayed. By default, this setting is set to -1 for browser.cache.memory.capacity and to a number you specified in Tools -> Options -> Advanced -> Network / Cache for browser.cache.disk.capacity
To fix your cache to a certain value
Note: browser.cache.memory.enable and browser.cache.disk.enable needs to be True for this to work
1. Start up Firefox
2. Type about:config in the address bar and hit Enter
3. Search for browser.cache.memory.capacity and set a number in KB to use for the memory cache (ie. 1024KB = 1MB).
4. Search for browser.cache.disk.capacity and set a number in KB to use for the disk cache (ie. 1024KB = 1MB).
To Disable the cache Totally
Set both browser.cache.memory.capacity and browser.cache.disk.capacity to 0.
Alternatively, you can also set browser.cache.disk.enable and browser.cache.memory.enable to False.
Tip 4: Use less extension and themes
This is really a no brainer. Uninstall all firefox extensions and themes that you don’t use as they can cause Firefox to use more RAM. If you think that you might still need the extension in future but not using it currently, at least there’s an option to Disable it. Use only extensions that you usually use to cut down memory usage.
Always upgrade your extensions and themes to the latest version as they may fix the some problems leading to memory leaks. Firefox makes this quit easy as it now does the checking for you, all you need is to do is tick some checkboxes and your plugins and themes wil be updated.
Tip 5: Check Firefox Memory Usage
Type about:cache?device=memory in the address bar and hit Enter. Firefox will display your current number of entries, maximum storage size, storage in use and inactive storage.
There you have it. Happy browsing!