Sometimes Firefox can become a real memory hog, especially if you keep it running for hours and have many tabs opened. In order to make Firefox a little more responsive and save some RAM memory, here are three tweaks I bumped into over time. Notice that most of these tips only free up some memory at the expense of (usually) loading speed for web pages. You won't make Firefox 10 times faster, but you will surely make it use less RAM.
Tweak the browser.sessionhistory.max_total_viewers variable
In Firefox, open a new tab (Ctrl+T) and type about:config in the address bar. Click on the I'll be careful, I promise! button and start typing the variable name browser.sessionhistory.max_total_viewers in the Filter text box.
This variable specifies Firefox how many pages it should keep in the memory, so when you hit Back and Forward buttons it loads pages faster. The default value is -1, which means that it sets a certain number of pages depending on the total RAM memory the system has. You can change this value to 0 (just double-click the variable), which means it won't hold into memory any pages.
Use the Flashblock extension to load Flash only on demand
Tweak the browser.cache.memory.capacity variable
Create the variable browser.cache.memory.capacity in the about:config dialogue and set it to 0. To create a new variable, right click anywhere, go to New -> Integer, insert the variable name where it says to enter the preference name, then set the integer value to 0. This will disable memory cache completely and free up some RAM. The default value is -1, which will set the values automatically. Alternately, you can set here a custom memory size, like 16 (which is default if you have 256 MB RAM and the variable is set to -1) or 32 (default for a system with 512 MB RAM). The same thing can be accomplished by setting the variable browser.cache.memory.enable to false.
This how-to is part of a series of Firefox-related articles I'm putting up. If you want to read them, here they are:
5 Essential Add-ons for Firefox 3
5 Useful Tips to Customise Firefox 3
Updated: May 3, 2009