Fix if Firefox's Undo Close Tab feature is disabled

Martin Brinkmann
Sep 6, 2013
Updated • Sep 7, 2013
Firefox
|
17

I have noticed a strange behavior in the Firefox web browser for the past two days or so. You probably know that you can undo closed tabs during a session with a right-click on the tab bar and the selection of Undo Close Tab from the context menu that opens up.

What you may also know is that this is also available for windows, so that you can restore a window that you have closed before. To do so, you need to hit the Alt-key on your keyboard, and select History > Recently Closed Windows.

Both options have not been available in my version of Firefox for the last two days at the very least. I first thought that this was because I was running the Nightly channel, knowing that errors like this could have sneaked in due to the massive amount of versions released to the channel.

A quick check however revealed that the stable version of Firefox showed the same symptoms.

Undo Closed Tab disabled

firefox undo close tab

The undo feature of the Firefox web browser is defined by two preferences that you find in the browser's advanced configuration dialog. You open it the following way:

  1. Type about:config into the address bar and hit the enter key afterwards.
  2. If this is your first time, a warning page will be displayed to you that you need to accept to continue.

Now that the about:config page is open, filter for the term browser.sessionstore. A couple of options are displayed here. The two relevant for the undo feature are:

  • browser.sessionstore.max_tabs_undo
  • browser.sessionstore.max_windows_undo

Both were set to 0 in the Firefox profile, which meant that the feature was disabled. You will notice immediately that the preference is modified if it is in bold on the page, and also by looking at the status column where user set indicates the same.

browser sessionstore

To resolve the issue, right-click on each preference and select reset from the context menu. This sets browser.sessionstore.max_tabs_undo to 10 and browser.sessionstore.max_windows_undo to 3.

What this means is that you can undo the closing of up to ten tabs and three windows in Firefox. You can increase or decrease the value as you see fit. Increasing it enables you to go back further but it may also impact the browser's memory use.

Note that you do need to restart Firefox before the new preference values take effect.

Closing Words

I do not know why the preferences got changed, let alone which program or extension made the change, as I did not make it. The most likely explanation is that an extension modified the preference on its own, but I cannot figure out which.

Advertisement

Tutorials & Tips


Previous Post: «
Next Post: «

Comments

  1. Tomáš Brunclík said on February 13, 2019 at 11:13 am
    Reply

    PS: When searching for the page on FF support, where this solution was missing I stumbled upon one which already contains it. Depends on search term in Google evidently, previously I was not able to find it and found this page first.

  2. Tomáš Brunclík said on February 13, 2019 at 11:08 am
    Reply

    Just want to say this tip works like a charm even in 2019 with FF 60.5.0esr (64 bit) Linux, while on Firefox support pages the only solution is to reset Firefox to factory settings. The only difference from your tip is, that reseting browser.sessionstore.max_tabs_undo actually sets the value to zero, so I have to set it my myself to 10. Looks like browser.sessionstore.max_tabs_undo=0 is factory setting in my FF, which is weird. The browser.sessionstore.max_windows_undo was 3 as it should be in my browser. Will add a comment to FF support linking to this solution.

  3. Lynn Harris said on November 27, 2013 at 11:18 am
    Reply

    For info purposes only: I have not added ANY add-ons or extensions to FF and also NO new applications or programs to my computer and had this changed on my browser after updating to FireFox 25.0.1 on Windows Vista machine. Also noticed while browsing making changes that the ‘browser.sessionstore.resume_from_crash ‘ had been changed to false as well. (explains why my crashed session yesterday didn’t reload).

    As this is a “live comment”, I haven’t restarted FF to see if this fixes my problem, but thanks for zeroing me in on where to look…

  4. Don Gateley said on September 15, 2013 at 8:42 pm
    Reply

    Hmm, Alt by itself does nothing on my Windows 7 machine in any context. Something must be configured wrong on my end. I was most interested in using it for Windows window history.

    1. pd said on September 17, 2013 at 8:32 am
      Reply

      Don I think Martin was referring only to Firefox, rather than any Windows 7 feature. I think I’d also be interested in a recently-closed programs or windows list at the operating system level. It does seem strange that no such functionality has ever been created that I can think of. Surprisingly a utility expert such a Nir Sofer has not thought of it. Then again, perhaps there is no such available information in the Windows APIs to support it?

      1. Martin Brinkmann said on September 17, 2013 at 8:54 am
        Reply
  5. Don Gateley said on September 15, 2013 at 8:55 am
    Reply

    “What you may also know is that this is also available for windows, so that you can restore a window that you have closed before. To do so, you need to hit the Alt-key on your keyboard, and select History > Recently Closed Windows.”

    Alt what? And from where? On my Windows 7 machine nothing at all happens when I hit Alt.

    1. Martin Brinkmann said on September 15, 2013 at 10:06 am
      Reply

      You tap on Alt while Firefox is active. It opens a menu bar, and you select History > Recently Closed Windows from it.

  6. clas said on September 8, 2013 at 3:08 pm
    Reply

    i remember a keyboard shortcut i saw recently to re open a closed tab…if this helps… its ctrl-shift-t works in ff anyway, havent tried any other.

  7. Seban said on September 7, 2013 at 1:36 am
    Reply

    Fortunately I don’t have this problem, but thanks anyway. It’s great to see articles like this.

    “What you may also know is that this is also available for Windows, so that you can restore a window that you have closed before.”
    Maybe it’s the time, but I almost started looking for the feature in Windows instead of the Firefox window. ;)

    btw another way to restore the tabs is per ctrl+shift+t

    1. Martin Brinkmann said on September 7, 2013 at 1:38 am
      Reply

      Right, corrected the upper case W to a lower case one.

  8. Amit Kumar said on September 6, 2013 at 5:44 pm
    Reply

    Hiiiii Martin,
    thanks for sharing such a great information here, you have very beautifully mentioned about – how to Fix if Firefox’s Undo Close Tab feature is disabled. i found a detailed and impressive post here. i have learnt many thing from this post. thanks again…..!!

  9. pd said on September 6, 2013 at 5:00 pm
    Reply

    Actually, the other change I made recently, that may be responsible, is to run the extension you suggested here:

    https://www.ghacks.net/2013/09/03/resolve-firefox-bookmarks-history-issues-places-maintenance/

    Perhaps there is a bug with the way that extension handles session restore related entries?

    1. Martin Brinkmann said on September 7, 2013 at 1:01 pm
      Reply

      Hm, could be. It is at least something that we both ran on our systems.

  10. pd said on September 6, 2013 at 4:58 pm
    Reply

    Running Aurora I’ve noticed the exact same behavior over the last couple of days. I thought it might be something to do with TabMixPlus but since you’re having the same problem, perhaps not.

    Unfortunately for me, neither of the prefs you mentioned were set to zero so there must be something broken in the session restore code of Firefox.

    1. Martin Brinkmann said on September 7, 2013 at 9:25 am
      Reply

      Did you try running Firefox without add-ons enabled?

      1. pd said on September 17, 2013 at 8:26 am
        Reply

        I should have been more specific. The part that no longer works for me is a button/menu I have on my toolbar that is, AFAIK, supplied by TabMixPlus. Using the drop-arrow menu of this button displays a recently-closed list and clicking on one of those items re-opens the tab. However clicking on the button itself, to reopen the last closed tab, fails.Perhaps this is some sort of pre-Australis pain or just a compatibility tweak that TMP needs to do?

        Re-opening tabs from the History menu still works and using the Ctrl + Shift + T shortcut *did* wok but just now it does not.

        Firefox 25.0a2 (2013-09-16)
        Place Maintenance 1.3
        Tab Mix Plus 0.4.1.1pre.130821a

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.