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

How do I restore previous session after upgrade?

  • 11 replies
  • 31 have this problem
  • 179 views
  • Last reply by cor-el

more options

I just updated Firefox and had to do a restart. When I did I lost all the previous tabs I had open. How do I restore them? I've Googled and cannot find sessionstore.js. It seems like this new version doesn't use this js file. Thanks in advance.

I just updated Firefox and had to do a restart. When I did I lost all the previous tabs I had open. How do I restore them? I've Googled and cannot find sessionstore.js. It seems like this new version doesn't use this js file. Thanks in advance.

Chosen solution

Unfortunately I had exited Firefox and then reopened it so it overwrote the recovery and previous js files. I did find a upgrade.js that was time stamped to before I restarted Firefox, and copied it to the main profile folder, but that didn't restore it.

Read this answer in context 👍 1

All Replies (11)

more options

First: Do not exit Firefox, or if you closed it, don't re-open it.

If Firefox is still up, check the History menu for "Restore Previous Session" and, if it's not grayed out, try that.

If that is grayed out or doesn't help, let's back up a few files. Here's how:

(1) To open your profile folder...

If Firefox is still running:

You can open your current Firefox settings (AKA Firefox profile) folder using either

  • "3-bar" menu button > "?" button > Troubleshooting Information
  • (menu bar) Help > Troubleshooting Information
  • type or paste about:support in the address bar and press Enter

In the first table on the page, click the "Show Folder" button.

If Firefox is closed:

Type or paste the following into the Windows Run dialog or the system search box and press Enter to launch Windows Explorer:

%APPDATA%\Mozilla\Firefox\Profiles

In that folder, do you see a semi-randomly-named folder? If so, click into it. If you find multiple such folders, find the one that was most recently updated.

(2) Copy out session history files

In your profile folder, scroll down and double-click into the sessionstore-backups folder. Save all files here to a safe location, such as your Documents folder. If not too much time has passed, we may be able to use them to recover your lost tabs.

(3) What files did you find?

The kinds of files you may find among your sessionstore files are:

  • recovery.js: the windows and tabs in your currently live Firefox session (or, if Firefox crashed at the last shutdown and is still closed, your last session)
  • recovery.bak: a backup copy of recovery.js
  • previous.js: the windows and tabs in your last Firefox session
  • upgrade.js-build_id: the windows and tabs in the Firefox session that was live at the time of your last update

Could you take a look at what you have and the date/time of the various files to see whether you think any of them would have the missing tabs?

Note: By default, Windows hides the .js extension. To ensure that you are looking at the files I mentioned, you may want to turn off that feature. This article has the steps: http://windows.microsoft.com/en-us/windows/show-hide-file-name-extensions

more options

You should have the upgrade.js-<build_id> file in the sessionstore-backups folder when Firefox updated with the tabs from that session.

You can use this button to go to the current Firefox profile folder:

You will normally find these files in the sessionstore-backups folder:

previous.js (cleanBackup: copy of sessionstore.js from previous session that was loaded successfully)
recovery.js (latest version of the sessionstore written during runtime)
recovery.bak (previous version of the sessionstore written during runtime)
upgrade.js-<build_id> (backup created during an upgrade of Firefox)

You can copy a file from the sessionstore-backups folder to the main profile and rename the file to sessionstore.js to replace the current file (make a backup copy of the current sessionstore.js).

See also:

more options

Chosen Solution

Unfortunately I had exited Firefox and then reopened it so it overwrote the recovery and previous js files. I did find a upgrade.js that was time stamped to before I restarted Firefox, and copied it to the main profile folder, but that didn't restore it.

more options

Hi CleoB, when Firefox starts up, it only looks for sessionstore.js.

With Firefox completely closed, rename the existing sessionstore.js to something like sessionstore-old.js and then rename the upgrade.js to sessionstore.js (to change the file extension, make sure Windows is showing them).

Then when Firefox starts it should use the replacement file.

more options

As I originally posted, I don't have a sessionstore.js file. I think Firefox musts have changed the file name in this new version.

more options

CleoB said

As I originally posted, I don't have a sessionstore.js file. I think Firefox musts have changed the file name in this new version.

When did you check for the file? When you exit Firefox, if it is set to remember history, it will create a new sessionstore.js file from the recovery.js file and remove the recovery.js file. When you start Firefox, it reads the sessionstore.js file and removes it. So if you checked while Firefox was running, it is normal not to find a sessionstore.js file.

more options

Hey! Me too! I upgrade to 45.0.1 and when Firefox started up, I had no option to restore anything. I found the "upgrade.js-2016..." file, etc., backed up everything and tried copying it to "sessionstore.js" one directory up. When I started Firefox, this file vanished and I still had no option to restore. Then I tried every permutation I could think of. I copied "recovery.js" and "previous.js" to "sessionstore.js", any file that had a substantial file size (i.e. not "1"). I copied it with Firefox running and when it was not. I started, stopped and started Firefox over and over. Nothing worked.

I realize I could just deconstruct the ".js" file, find all the tab names and reload them one at a time manually, but why should I have to do that?

Respectfully, the standard advice (above) isn't working, and Firefox 45 isn't behaving as described.

Any other suggestions before I start opening "previous.js" with the text editor?

more options

Hi ezfzx, if Restore Previous Session is grayed, usually that means Firefox did restore. Does the History menu show any closed windows that you could re-open? Or closed tabs in the current window?

more options

It's behaving like a brand new installation. It has a history of past sites, but no sessions to restore. Speaking as a former programmer, and having looked over the "previous.js", it's just basic javascript and I can't imagine why it's so hard to get it to kick in. Javascript isn't my expertise, but I've seen enough code to recognize that some little bit is flipped the wrong way in the browser and it just won't read it; it's not a big thing if you wrote it and you know where to look. In fact, by the time we're up to version 45, seems like there would be a whole basket of little one-shot utilities the developers would have made to fix stuff like this. I bet there's one line of code I could call from the browser that would activate this session sequence and put it all back in seconds, and one of those cubicle mice has it sitting on his or her computer. Instead, I've got to waste hours of my day trying to reverse-engineer this software, which, by version 45, should be robust, pristine and flawless. I appreciate that it's basically freeware ... I really do. And, as freeware goes, it's some of the best there is. I'll take Firefox over any other browser out there. Mozilla has raised the bar, which means the user community has been trained to expect more. So, I'm not angry, just disappointed that they could let this one trip up get through.

more options

Hi ezfzx, "previous.js" is a JSON-format object, and there are many parsers for JSON. If you open a "Scratchpad" (see: https://developer.mozilla.org/docs/To.../Scratchpad), load previous.js into it, and click Pretty Print, you can get a better idea of how the data is structured, and inspect its contents. (See attached screenshot.)

Sometimes the JSON becomes corrupted and Firefox cannot use it. Since my first language is Word Visual Basic (VBA), when I had to try extracting from a damaged file before, I wrote a Word macro: http://pastebin.com/iK6x2i1N

Here's a macro-enabled document set up with that macro, with slight formatting tweaks: https://jeffersonscher.com/res/SessionExtract.docm (please be careful with macro-enabled Office files as they often are used as malware vectors these days).

more options

Did you check for "History > Recently Closed Tabs/Windows" after you restored the upgrades.js file?