Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Cuireadh an snáithe seo sa chartlann. Cuir ceist nua má tá cabhair uait.

Restore second last closed session

more options

Hi!

I had two Firefox windows open at the same time, one with a lot of tabs open in it, and one with only a few open. I was going to close firefox in order to restart the computer, and closed the window with many tabs in it first, and then I closed the window with only a few tabs in it. The next time I started Firefox, only the window with a few tabs in it loaded, and not the other window in which I had the vast majority of all opened tabs. And I can't find any way to restore the tabs from the other window either. I have looked under the History menu, but I don't see any option to restore a previous session there, so I'm guessing that Firefox thinks that it already has restored the previous session when I opened it up again.

So, how can I restore the tabs I had in the other window, with a lot of tabs opened?

Hi! I had two Firefox windows open at the same time, one with a lot of tabs open in it, and one with only a few open. I was going to close firefox in order to restart the computer, and closed the window with many tabs in it first, and then I closed the window with only a few tabs in it. The next time I started Firefox, only the window with a few tabs in it loaded, and not the other window in which I had the vast majority of all opened tabs. And I can't find any way to restore the tabs from the other window either. I have looked under the History menu, but I don't see any option to restore a previous session there, so I'm guessing that Firefox thinks that it already has restored the previous session when I opened it up again. So, how can I restore the tabs I had in the other window, with a lot of tabs opened?

All Replies (14)

more options

When Firefox closes, it records only the currently open windows/tabs.

That information is stored in the sessionstore [v56] sessionstore.jsonlz4 file(s). This might be able to find the lost data.

If you need to rescue any data from them, just copy them out of the profile folder to some location where Firefox doesn't look for them. You can try to read out their contents using this tool: https://www.jeffersonscher.com/res/scrounger.html


Type about:support<enter> in the address box.

Under the page logo on the left side, you will see Application Basics. Under this find Profile Folder. To its right press the button Show Folder. This will open your file browser to the current Firefox profile. Now Close Firefox.

Windows: Show Folder; Linux: Open Directory; Mac: Show in Finder

Linux: Under the page logo on the left side, you will see Application Basics. Under this find Profile Directory. To its right press the button Open Directory.

Locate the above file.

more options

@FredMcD Thanks for your reply. Which file do you mean? I have no file named sessionstore in that folder; the closest matches are a file called sessionCheckpoints.json and a folder called sessionstore-backups, and in that folder I have six files: previous.jsonlz4, recovery.baklz4, recovery.jsonlz4, upgrade.jsonlz4-20211103134640, upgrade.jsonlz4-20211119140621 and upgrade.jsonlz4-20211215221728.

It's basically only the URLs I want to restore, I don't think I had written anything I wanted to save in the tabs anyway so I don't need to rescue any more data than the tab URLs. Is it possible to extract the URLs of all tabs that were open in that window somehow?

Athraithe ag krikru ar

more options

@FredMcD Thanks for your reply. Which file do you mean? I have no file named sessionstore in that folder; the closest matches are a file called sessionCheckpoints.json and a folder called sessionstore-backups, and in that folder I have six files: previous.jsonlz4, recovery.baklz4, recovery.jsonlz4, upgrade.jsonlz4-20211103134640, upgrade.jsonlz4-20211119140621 and upgrade.jsonlz4-20211215221728.

It's basically only the URLs I want to restore, I don't think I had written anything I wanted to save in the tabs anyway so I don't need to rescue any more data than the tab URLs. Is it possible to extract the URLs of all tabs that were open in that window somehow?

more options

If Firefox restored one window, try this menu (three ways to access) and see whether it lists the other one:

  • "3-bar" menu button > History > Recently Closed Windows
  • "Library" toolbar button > History > Recently Closed Windows
  • (menu bar) History > Recently Closed Windows

Fingers crossed.

more options

@jscher2000 All I had there a while ago when I checked first after reading your comment was two tabs, and now when I look again at the same place it's empty (or rather, "Recently closed windows" is greyed out). So it doesn't seem to do what I want.

I really think there should be an easy way to restore the tabs from that window I closed. I closed it literally only seconds before closing the other window, which Firefox could restore without problems. I don't think the order in which the windows are closed in this case should be a determining factor for which window gets (or can be) restored and which doesn't get restored. There is no intuition that tells you that you need to close the windows in a specific order if you want the tabs in a specific window to be restoreable.

And why can't just all windows get restored? If I have several windows open and need to close Firefox (e.g. to restart the computer), why shouldn't Firefox be able to restore all windows the next time I start it? Why do I have to pick one window for which I want the tabs to be restored in and throw away the tabs in all other windows? Do I really have to drag over the tabs from one window to another before closing Firefox if I want to be able to restore all tabs? That seems like such a workaround for a problem that shouldn't even need to be there in the first place.

Athraithe ag krikru ar

more options

Can't you restore that closed window ?

  • History -> Recently Closed Tabs/Windows

Note that if you notice that you have another window open the restore the main window before closing Firefox.

Use one of these to close Firefox if you are currently doing that by clicking the close X on the Firefox Title bar.

  • "3-bar" menu button -> Exit (Power button)
  • Windows: File -> Exit
  • Mac: Firefox -> Quit Firefox
  • Linux: File -> Quit
more options

krikru said

I really think there should be an easy way to restore the tabs from that window I closed. I closed it literally only seconds before closing the other window, which Firefox could restore without problems. I don't think the order in which the windows are closed in this case should be a determining factor for which window gets (or can be) restored and which doesn't get restored. There is no intuition that tells you that you need to close the windows in a specific order if you want the tabs in a specific window to be restoreable.

Firefox only restores the windows that were OPEN at the time of shutdown. When you shut down Firefox using the X buttons, there will only ever be 1 window left. The last 3 windows closed before that appear on the Recently Closed Windows menu, unless that has been disabled in about:config.

And why can't just all windows get restored? If I have several windows open and need to close Firefox (e.g. to restart the computer), why shouldn't Firefox be able to restore all windows the next time I start it? Why do I have to pick one window for which I want the tabs to be restored in and throw away the tabs in all other windows? Do I really have to drag over the tabs from one window to another before closing Firefox if I want to be able to restore all tabs? That seems like such a workaround for a problem that shouldn't even need to be there in the first place.

Sure, I restore a dozen windows all the time. The secret is to close Firefox using Exit on either the main menu or the File menu. All of the windows open at the time you click Exit are restored because they were still OPEN at the time of shutdown.

more options

@cor-el I can't restore the closed window like that. "Recently Closed Tabs" only displays a few tabs, and it would take a long time to open them all like that anyway, if that meant you had to go into the menu and open them one by one. And "Recently Closed Windows" is greyed out, as I wrote previously. What do you mean by the "main window"? And what do you mean by restoring it before closing Firefox? I don't understand what you mean by that or what purpose that would serve.

Athraithe ag krikru ar

more options

jscher2000 said

Firefox only restores the windows that were OPEN at the time of shutdown. When you shut down Firefox using the X buttons, there will only ever be 1 window left. The last 3 windows closed before that appear on the Recently Closed Windows menu, unless that has been disabled in about:config.

Hm, I haven't disabled anything like that in about:config as far as I know. What setting is that?

Sure, I restore a dozen windows all the time. The secret is to close Firefox using Exit on either the main menu or the File menu. All of the windows open at the time you click Exit are restored because they were still OPEN at the time of shutdown.

Aha, thanks! I will try that next time.

more options

krikru said

jscher2000 said

Firefox only restores the windows that were OPEN at the time of shutdown. When you shut down Firefox using the X buttons, there will only ever be 1 window left. The last 3 windows closed before that appear on the Recently Closed Windows menu, unless that has been disabled in about:config.

Hm, I haven't disabled anything like that in about:config as far as I know. What setting is that?

The preference is browser.sessionstore.max_windows_undo -- default value is three, but more may be better.

more options

jscher2000 said

The preference is browser.sessionstore.max_windows_undo -- default value is three, but more may be better.

It's set to three for me (and I haven't changed it), but "Recently Closed Windows" is still greyed out.

more options

FredMcD said

If you need to rescue any data from them, just copy them out of the profile folder to some location where Firefox doesn't look for them. You can try to read out their contents using this tool: https://www.jeffersonscher.com/res/scrounger.html

I tried this tool, but when I click on "Scrounge URLs", it displays "Processing..." but doesn't seem to stop processing. It has been like that for several minutes now, which I think is quite long, considering that the file itself isn't even 4 MB. How long time is it supposed to take?

more options

You can try to decompress the file via the Browser Console with the code posted in this reply.

To enable the command line in the Console:

more options

krikru said

FredMcD said

https://www.jeffersonscher.com/res/scrounger.html
I tried this tool, but when I click on "Scrounge URLs", it displays "Processing..." but doesn't seem to stop processing. It has been like that for several minutes now, which I think is quite long, considering that the file itself isn't even 4 MB. How long time is it supposed to take?

For comparison, I have about 120 tabs open, and my file including 10 closed windows is 1.7MB. When I load it into the page, there is a short delay while the file is decoded (readable text fills the textbox). Does that first step work on yours? The box starts off with something like this:

{"version":["sessionrestore",1],"windows":[{"tabs":[{"entries":[{"url":

After that, it only took a couple seconds for Scrounge URLs to show "Done". Perhaps the script in my page doesn't recognize something in your file and is going off to la-la land?