How to disable the recently closed tabs and windows functionality in Firefox
Most modern web browsers support the restoring of closed tabs or windows to a certain degree. While the number of tabs or windows that you can recover may be different, it is fair to say that this is a useful feature for many users.
In fact, it has saved me from losing valuable website information after a crash or accidental closing of tabs or windows on the system.
Depending on how you use Firefox, you may use the feature either regularly, or not at all.
What's interesting in this regard is that the restoration options remain available even if you delete the browsing history of the Firefox browser.
It appears to be handled independently, which may cause privacy issues in some cases, for instance when the PC is shared with multiple users.
Firefox will save the last ten closed tabs and the last three closed windows by default during a browsing session. If you do not want that, or think it is not enough, you can easily change that in the browser's advanced configuration.
- Type about:config into the browser's address bar and hit enter.
- Confirm you will be careful.
- Proceed below from this point on.
Modify recently closed tabs
- Search for browser.sessionstore.max_tabs_undo
- This preference defines how many tabs can be restored in Firefox.
- Double-click the preference and change it to another value if you want to increase or decrease it.
- To turn it off completely, set it to 0.
Modify recently closed windows
- Search for browser.sessionstore.max_windows_undo
- This preference defines how many closed windows can be restored in Firefox.
- Double-click the preference and change it to another value.
- To disable it completely, set it to 0.
Resetting the values
To reset any value that you have modified, right-click the preference and select the reset option from the context menu that is displayed to you.
It is obviously possible to increase the values, which is fine if you are the sole user on the computer or if user profiles are used to distinguish between accounts.
If you find yourself in situations where you need to restore tabs exceeding the 10 tab limit that Firefox normally uses, or windows exceeding the 3 window limit, then you can increase that to adjust so that it fits better with how you use the browser.
If you share the browser, you may want to consider disabling the feature, as other users may use it to restore tabs that you have closed even if you have deleted the browsing history.
Then again, it may be time to create different user accounts for the different users on the computer to avoid this from happening in first place.
Note: Firefox seems to clear those recovery options only when you close the browser, but not while it is still running (if you set it to 0).
There is an even easier solution to this, but it would have the consequence that you disable the session restore feature. Do the following to disable it:
- Tap on the Alt-key to bring up the menu.
- Select Tools > Options.
- Change "When Firefox starts" from "show my windows and tabs from last time" to another option under General.
Or use the excellent Mozilla Firefox add-on Session Manager 0.8.0.8 or any outer look a like.
With Session Manager you can save and restore the state of all or some windows.
And much more.
I used this for a while when the native session restore feature did not work correctly.
As you increase the number of add-ons with any browser, you decrease the security of your browsing as add-ons “phone home”.
Yup I am also using “Session Manager”
Another advantages of using “Session Manager” is that you don not have to change in core file.
But Good tutorial Martin.
Problem with FF 27! After I updated, ctrl+shift+T is not working. I checked browser.sessionstore.max_tabs_undo and its value is 10. Cant figure what is the problem! Any suggestion?
[I have tab-mix-plus addon as well]
We have an easy solution for this, one that doesnâ€™t require going to the full history section. When you click the clock icon that takes you to history, your browser will ask if you would like to reopen your recently closed tabs. If you click yes, they will come back as if you had never closed them in the first place.