Modern browsers are ruthlessly fast, feature-rich, extendable, and memory hungry. There was a time when Firefox’s huge collection of browser extensions was its major selling point but soon it turned out to be the bane of its existence. Firefox not only poorly handled memory-hungry extensions (including annoying restarts after extension install and upgrades) but FF had its own problem with memory leakage. Firefox’s memory leaking and usage problem were pretty bad, to say the least.
In came chrome to rescue us with a browser that promises to be fast and lean with a zen-like minimalistic UI.
But soon Chrome started to have problems of its own. You see one of the many selling points for Chrome was how it handles its tabs and extensions into its own sandboxed container. This makes the browser safer and less prone to browser-wide crash because of some guilty website/plugin-in or extension. But this also makes the browser use a lot more memory than single-process browsers, like the Firefox of the past. As a matter of fact, Google (or rather chromium) openly admits this problem and supports the trade-off as being a good thing.
Mozilla is working on its own multi-process solution, but it probably won’t be ready soon.
So we are back to square one when it comes to browser memory usage. It probably doesn’t bother some of you. Memories are cheap and most modern computers come with tons of memories to spare but it also results in applications being ok with consuming vasts amounts of memory for no good reasons at all. I have had Chrome/Firefox instances consuming 2-3GB of memory and I don’t even use that many tabs.
So for those of you who are not OK with your browsers using tons of memory here is what you can do:
- Uninstall/disable extensions you don’t use anymore. Even if you don’t use any extensions, they will happily chug away memory like it’s their birthright. I find myself constantly installing new extensions just to see what they do and forget to remove them afterward. Each extension gets loaded every time you open your browser whether you use them or not. After ruthlessly going through my extension collection, I found only 5-6 extensions that I see myself using all the time. Most of them I will probably not use again and for some, I might use once in a while. So remove the ones you don’t need and disable the one who only use once or twice a month.
- Disable built-in plugins like Java, Silverlight, and flash. They are the biggest memory consumers. You can use htlm5 video players, most major video services have html5 video option and most major browsers support it. You can also use a third-party extension to only use plug-ins for case by case basis. There are many flash/java blocker extensions out there. The trade-off of installing these extensions over having these plug-ins enabled is justified.
- Most modern websites load many third-party scripts asynchronously even after you have finished loading the site. These third-party scripts load their own junk scripts in the background causing your browser to use more memory. You can custom-block these offending scripts by using extensions like NoScript, which will not only save you memory but also make browsing the web much faster. Unfortunately, some sites break if you disable scripts, but you have granular control on which scripts or site you want to block.
- While doing this might cause your browser to crash in certain scenarios (never happened to me yet) but you can limit the amount of memory your browser can use on Linux and on Windows system. I have tried a 1GB memory limit on Linux without any problem, but it could depend on how you tab-happy you are with your browser.
Feel free to share your experience with browser memory usage and how you deal with it.