Unload Inactive Tabs To Drastically Free Up Memory In Firefox

UnloadTab is an extension for Firefox which can unload inactive tabs – saving RAM (memory) and freeing up CPU resources.

It must be noted that Firefox has made significant improvements in memory usage over the last year and was the runaway winner in our last tests of browser memory usage – Chrome and IE9 fared significantly worse.

Even so, some Firefox users may still face performance issues caused by misbehaving sites/add-ons or due to a lack of system memory e.g. on a netbook or old PC. UnloadTab can help by drastically minimizing RAM usage – and, as the next section explains, also lower CPU usage.

Inactive Tabs Can Affect RAM and CPU – Keeping lots of inactive tabs open doesn’t just use up more RAM, they can also burn up CPU cycles even though they are in the background and you’re not using them…

Taras’ Mozilla blog post details how webpages may poll the webserver on a regular basis (every few seconds) to synchronize news tickers, social networking shoe-ins, collaborative editing etc: “Most pages do this regardless of whether they are a background or a foreground tab. In Firefox these … [polling requests can] … cause significant UI lag, but they will also eat your battery life, overheat your laptop, etc.”

Therefore, unloading inactive tabs not only frees up RAM but may also reduce CPU usage – because they can no longer keep polling their server.

Test Results – In my own tests, with multiple tabs open, RAM usage is typically reduced by more than 50% when all the inactive ones are unloaded – the more open tabs you have the more benefit you should see.

e.g. I opened 15 tabs using 450MB – reduced to 180MB after UnloadTab automatically unloaded all except the current tab.

Main Features

  • Automatic and/or manual unloading of inactive tabs. You can set a number of minutes after which to automatically unload all inactive tabs. You can also manually unload a tab (or all other tabs at once) from the three new options at the top of the tab context menu as shown below:
UnloadTab1
Tab context menu
  • Optional exclusion of tabs from unloading – you can use the tab context menu to Keep Address Loaded (as shown above) and/or whitelist individual websites in the add-on’s Options (i.e. sites that you want to always keep loaded).
  • Control tab loading when Firefox starts up – for best memory usage you can choose to load only the selected (current) tab when Firefox starts (and any you have set to keep loaded).
  • You can also choose to keep pinned tabs loaded at all times e.g. your Twitter feed (but bear in mind that sites like Twitter are the most likely to be polling the server for frequent updates in the background…)

An unloaded tab is restored back to its original state (i.e. loaded) when you next click on it – this is similar to the way that the standard Firefox Options \ Tabs setting of ‘Don’t load tabs until selected’ works except that only applies to when you start Firefox. UnloadTab lets you unload tabs again after they have been loaded, not just at startup.

Using UnloadTab – Download and install it from Mozilla add-ons here.

Note: the extension author labels it ‘experimental’ because it might not play nice with some other addons. This errs on the side of caution (no extension can claim 100% compatibility) but user comments suggest it may not work if you use the Tab Mix Plus session manager. Personally I have not noted any problems – and I have 16 other add-ons installed…

Go to the Options page for the add-on and configure your required settings:

UnloadTab2
UnloadTab Options

The key setting for automatic unloading is the second setting – ‘Unload tabs after’. Set to -1 if you want to disable it else configure the number of minutes to best achieve a balance between lower RAM/CPU usage and not unloading a tab before you have chance to view it.

You can also whitelist addresses here to keep certain sites loaded at all times, configure how pinned tabs behave, choose what to do when Firefox starts and how to deal with opened/closed tabs.

Conclusion

UnloadTab is one of the most useful Firefox performance extensions I have tested. It succeeded in reducing RAM usage by at least 50% on my systems when multiple tabs were open and it prevented intermittent CPU spikes caused by supposedly inactive background tabs.

Firefox offers a similar function but only when Firefox starts – this extension goes so much further, not only does it offer whitelisting and a way to treat pinned tabs differently but, crucially, it adds the ability to unload tabs which are already open to maximize performance gains.