This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Buscar en Ayuda

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

Both "restore previous session" and "recently closed tabs" options open a new tab instead of the actual tabs I want. How do I fix this?

more options

Every time I click "restore previous session", the only thing that opens is the page that would usually come up when I hit "open new tab". This happens whether I choose the option from the Firefox home page or the History In addition, when I click a tab from the "recently closed tabs" list, this same new tab appears instead of the actual link I intended to open. It doesn't seem to matter which tabs I click on. Finally, when I click on a link that is scripted to automatically open up in a new tab, the home page tab opens up in the same window and the ACTUAL link opens up in a new window. What's happening here, and can I fix it?

Every time I click "restore previous session", the only thing that opens is the page that would usually come up when I hit "open new tab". This happens whether I choose the option from the Firefox home page or the History In addition, when I click a tab from the "recently closed tabs" list, this same new tab appears instead of the actual link I intended to open. It doesn't seem to matter which tabs I click on. Finally, when I click on a link that is scripted to automatically open up in a new tab, the home page tab opens up in the same window and the ACTUAL link opens up in a new window. What's happening here, and can I fix it?

Todas las respuestas (4)

more options

Sometimes Firefox's session history file becomes corrupted and the true URLs are lost or inaccessible. It might be too late for me to help you, but let's take a look:

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

(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

To look inside Firefox's .js files, do not double-click or try to Open them -- that will execute them as Windows sytem scripts, which can have unpredictable consequences.

If you want to view the contents of a .js file in your default text editor, right-click and use Edit.

However, the JSON format used in session history files is packed into a single line and hard to read in a text editor, so other techniques may be easier. For example:

Inside Firefox, call up a new Scratchpad. You can do that using either:

  • "3-bar" menu button > Developer > Scratchpad
  • (menu bar) Tools > Web Developer > Scratchpad

On the top bar, click Open File, then using the file browser to find the previous.js file (or other relevant file) in the Documents folder where you pasted copies of your session history files.

That may take several moments to load if it's a large file. Then on the top bar of the Scratchpad, click Pretty Print to re-lay-out the file in a more readable way. Assuming that works, you'll see "entries" numerous times, with a list of one or more addresses for that tab. (Example screen shot attached.)

This should help you determine whether the file you're inspecting has real addresses or only blank tabs.

more options

Thanks! I've opened up both my previous.js and recovery.js files and my last session seems to be intact. Is there a way to recover my session in the browser using these files?

more options

Just to set the tone: there are some couple tortured and convoluted methods you could try.

In another thread yesterday, I described both the

(1) "Swap in the other file" method -- which may or may not work if the current file isn't working

(2) "Extract the addresses" method -- which generates an HTML document with the links, but doesn't automatically load them in tabs

https://support.mozilla.org/questions/1136583

Could you check those and see whether they look helpful?

A third possibility is the

(3) "Structure is corrupted so just scrounge out the URLs" method -- I have a Word document with an embedded macro for that, if you have MS Word

https://www.jeffersonscher.com/res/SessionExtract.docm -- please make sure you trust the document provider before enabling macros in an Office document because they have extensive access to your system