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.