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

max tabs windows undo firefox

  • 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.
Please share this article

facebooktwittergoogle_plusredditlinkedinmail


Responses to How to disable the recently closed tabs and windows functionality in Firefox

  1. Paul(us) February 5, 2014 at 2:53 pm #

    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.
    https://addons.mozilla.org/en-US/firefox/addon/session-manager/

    • Martin Brinkmann February 5, 2014 at 2:54 pm #

      I used this for a while when the native session restore feature did not work correctly.

  2. Swarup February 5, 2014 at 4:46 pm #

    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.

  3. Varun February 6, 2014 at 3:59 am #

    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]

Leave a Reply