Hibernate tabs in Firefox with Sleep Mode
Sleep Mode is a new browser extension for the Firefox web browser that hibernates all but the active tab on activation. Doing so frees up memory, saves battery, and may speed up operations.
Web browser users who open multiple tabs during browsing sessions may notice that memory use increases when doing so. Depending on the available resources, especially memory and battery, thresholds may be reached that may slow down operations.
Third-party tools and browser extensions may help tame memory usage of browsers automatically, semi-automatically or manually. Firefox lost a good chunk of extensions designed to improve memory usage as they relied on the old extensions system.
Firefox 67 may unload tabs automatically in low memory situations similarly to how Google Chrome does it since 2015.
Sleep Mode
Sleep Mode is a simple extension that is highly beneficial in some cases. The extension adds an icon to the main Firefox toolbar during installation that you may interact with.
The icon acts as a toggle. A click starts sleep mode functionality. Any tab, with the exception of the active tab and tabs that have not loaded fully or not at all, are put into Sleep Mode to free up memory and improve power usage and performance of the system.
Sleep Mode unloads the site and adds Sleep Mode to the beginning of the page title; the latter may hide the entire page title which makes identification of the unloaded site difficult.
A quick test with just a few open tabs reduced memory usage by over 200 Megabytes (from 600 to 400).
Sleep Mode remains active and will put tabs with loaded content into an unloaded state automatically. Means: there is only one loaded site in Firefox when Sleep Mode is enabled. Note that the extension impacts pinned tabs and tabs with audio or video playback just like any other tab.
You may use an extension like Tab Suspender instead if you don't want pinned tabs or tabs with audio playback impacted by the suspension.
Another click on the Sleep Mode icon returns to normal mode. All unloaded sites are loaded again. You may need to switch to some tabs to complete the loading process. An option to limit the loading or prevent it from happening would be useful.
Closing Words
Sleep Mode is a useful browser extension for the Firefox web browser to reduce the browser's memory usage and power usage by limiting the number of active tabs in the browser to one. The unloading frees up memory, and if RAM usage is your main concern, it is certainly worth a try.
I'd like to see options added to the extension to improve usability. Options to ignore pinned tabs or tabs with audio playback, and more control when the mode is disabled would make a good start.
Now You: How much memory does your browser use?
I use Simple Discard Tab. Uses less permissions than all the other tab discard extensions.
Thanks for this article. Tried both sleep-mode and tab-suspender (with 20 tabs open). Sleep-mode did not free up any memory. In contrast, tab-suspender worked.
I’ve tried ‘Sleep Mode’ and if does work flawlessly I remain puzzled that it states in its AMO page what would be a feature of discarded tabs : reducing RAM.
Be it ‘Sleep Mode’ as any other comparable extension I’ve tried, that is extensions discarding tabs in their very own way (‘Auto Tab Discard’, ‘Tab Suspender’, ‘Tab Unloader’, Total Suspender’ as well as ‘Tabs2List’ which is installed), if I check Firefox RAM usage in Windows Task Manager before and after tabs are discarded (let’s consider all except the one I’m using, as in ‘Sleep Mode’), the amount is the same. What I do notice is the the CPU of discarded tabs is indeed zero, which is normal, but I don’t notice via the Task Manager a reduction of RAM.
Am I missing something?
I think it’s useful for my laptop. Especially in case of low battery. I want still continue my work and don’t want to close all my tab, because i will need it sometime.
* Allow setting (still alpha version)
– Ignore pinned tabs
– Sleep timer: sleep mode automatically will be actived after 0-120 mins
I think Sleep Mode is good. It is really simple to use with me. In most use case, just one click to active or deactive. Special, the tab i want to use will automatically wakes up to ready. Really simple and effectively.
> How much memory does your browser use?
Firefox 66.0.2 (x64) / Windows 7 (x64), no disk cache, browser.cache.memory.capacity = 1048576 (1GB) — 44 extensions + 10 userChrome.js scripts. System RAM is 8GB.
When I start Firefox, Windows’ Task Manager shows 5 Firefox instances totaling 387MB.
I never keep more than 10 tabs open, nevertheless I use an extension called Tabs2List which includes a feature enabling to hide (which hibernates as well) all or a chosen tab(s), which I never use.
After having ran RAM-hungry tabs (long videos, Google Maps when Google Street View especially) I perform RAM cleanup with Firefox’s built-in about:memory / Free memory (sometimes freeing up hundreds of MBs).
Tom: tried you ‘about-memory > Free memory. Reduced FF from 727.3 mb to 440.4 mb. Thanks!
They spend all their time working on new features (which is great) instead of optimizing the underlying foundation. Maybe like 10% on new features and 90% on optimization, would be a good mix I dont know I am not a developer.
Great suggestion. I end up with an obscene number of tabs open sometimes.
“Third-party tools and browser extensions” – Link got mixed up with something else in this sentence.
Sorry about that, fixed the link!
Which is the best between this, Dormancy, Auto Tab Discard, UnloadTabs, or Tab Suspender? Personally, Dormancy has never worked for me. Right now I’m using Auto Tab Discard, but I’ve never tried this one or Tab Suspender.
Auto Tab Discard remain the best of his category.