Comments: By default, Firefox does not use a fixed size memory cache. Setting a fixed size memory cache can reduce memory usage. The about: config window in Firefox lists many options you can change.
Solution: To set a fixed size memory cache, add the following preference in about:config (type in “about:config” in the address bar): browser.cache.memory.capacity This is an integer value, and can be set to the size you want the cache to be, in kilobytes. To disable the memory cache entirely, set browser.cache.memory. enable to false. Note that this is not advised unless you’re extremely short of memory, as it can slow things down severely, as well as causing other odd behaviour.
There is also a preference that enables trimming Firefox memory usage when you minimise all Firefox windows. To enable it, set “config.trim_on_minimize” to “true” in about:config.