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

Martin Brinkmann
Feb 5, 2014

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.

Tutorials & Tips

Previous Post: «
Next Post: «


  1. Egghead said on July 29, 2020 at 9:51 am

    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.

  2. Varun said on 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]

  3. Swarup said on 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.

  4. Paul(us) said on February 5, 2014 at 2:53 pm

    Or use the excellent Mozilla Firefox add-on Session Manager or any outer look a like.
    With Session Manager you can save and restore the state of all or some windows.
    And much more.

    1. Buttschnauzer said on April 20, 2020 at 4:15 pm

      As you increase the number of add-ons with any browser, you decrease the security of your browsing as add-ons “phone home”.

    2. Martin Brinkmann said on February 5, 2014 at 2:54 pm

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

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.