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

Is there a relatively straightforward way—i.e., suitable for a novice user—to restore a lost previous session using an upgrade.js file in sessionstore backups?

  • 9 replies
  • 3 have this problem
  • 23 views
  • Last reply by Kaelkitty

more options

Calling myself is novice is beyond generous, and I'm so far out of my depth that I'm almost afraid to seek help because I'd almost inevitably end up infuriating even the most patient of souls. If what I'm asking is even possible to start with, it's very likely I've already passed over a potential answer simply because I don't fully comprehend so much as half of the advice being given.

Calling myself is novice is beyond generous, and I'm so far out of my depth that I'm almost afraid to seek help because I'd almost inevitably end up infuriating even the most patient of souls. If what I'm asking is even possible to start with, it's very likely I've already passed over a potential answer simply because I don't fully comprehend so much as half of the advice being given.

Chosen solution

Note: The bookmarklet in this later reply may be easier: https://support.mozilla.org/questions/1136583#answer-911290


If restoring the session history file is too daunting, you could turn it into a document listing the links in the file. This is something that worked for me, but I look forward to feedback.

(1) Open this page: https://www.jeffersonscher.com/res/session-extract.html

(2) Click in the box to select the script there and copy it (either right-click > Copy or Ctrl+c)

(3) Open a new tab (Ctrl+t)

(4) Drag and drop the session history file you want to restore onto the new tab page to replace it with your session history file. If Firefox wants you to save it instead of display it in a tab, you may need to rename the file with a .json extension.

(5) Launch a new Scratchpad for that tab, using the Developer menu, either:

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

If that opens maximized, make it resizable and shrink it down a bit so you can see behind it.

(6) Paste the script you copied in step one at the bottom of the Scratchpad editing area, and click Run to run the script

(7) View the tab with your session history and click OK

Either a list will open in a new tab, or a popup blocker bar. If you get the popup blocker bar:

(A) Allow popups for the page (B) Then, if a duplicate tab opens, close the duplicate tab (C) Return to the Scratchpad and click Run again

(8) When you get your list in a new tab, you can save the page for future reference using Save Page As (right-click a blank area of the page, or use the File menu).

Sorry I can't make that easier at the moment.

Read this answer in context 👍 1

All Replies (9)

more options

Hello   !
You sure can use an ego boost and I am going to give it to you   !
For, you see, all that I can come up with is this:

https://addons.mozilla.org/en-US/firefox/addon/session-manager/

more options

Hi Girolamo_Castiglione , First of all: if you are tying to recover anything important make a backup of the complete Firefox profile. That will help preserve any useful information. See

sessionstore backups These files are designed so that Firefox itself is able to try to make a best attempt at transparently & magically restoring things when they go wrong, or a knowledgeable person has a chance of utilising them to recreate a specific restore point.

The fact you have discovered such files or mention of them probably lifts you out of the novice class.

Specifically upgrade.js relates to the state at a previous Firefox upgrade. So if you know you have a session at that particular upgrade date you wish to restore it is pretty easy to do once you learn some of the basics. Depending on what you are attempting to achieve searching Bookmarks or History my be easier and more appropriate.

This is a good article about the relatively new sessionstore sytem

It is not something we document in our current Knowledge Base

The above two articles mention it but are not really dealing with trying to manually change files.

It is probably best if you explain the problem, and what you hoped to achieve.

more options

The following is a lot of steps, and you'll either need to print it or view it in another program because you'll need to exit out of Firefox. Deep breath...

To try swapping in a session history file from your backup folder so Firefox will load it, the standard "manual swap" method is as follows (assuming Firefox is still running).

First, set Windows to show .js file extensions if it doesn't already do so. See: http://windows.microsoft.com/en-us/windows/show-hide-file-name-extensions

(1) From inside Firefox, 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. This should launch a Windows Explorer window listing the various files and folders in your profile.

(2) Leaving that window open, switch back to Firefox and Exit, either:

  • "3-bar" menu button > "power" button
  • (menu bar) File > Exit

Pause while Firefox finishes its cleanup -- these changes should occur:

  • recovery.js is moved from the sessionstore-backups folder to the main level of the profile folder and renamed to sessionstore.js
  • recovery.bak is deleted from sessionstore-backups

(3) Once Firefox has stopped updating things, while viewing the main level of the profile folder, rename sessionstore.js to sessionstore.old

(4) Copy in the other file you want to restore, and rename it to sessionstore.js -- after the rename, Windows should show it right next to sessionstore.old in alphabetical order

(5) Start Firefox and it should read the swapped in sessionstore.js and restore whatever was in the substitute file; if you do not have Firefox set to restore your previous windows and tabs automatically, use History > Restore Previous Session

Any luck?

more options

Chosen Solution

Note: The bookmarklet in this later reply may be easier: https://support.mozilla.org/questions/1136583#answer-911290


If restoring the session history file is too daunting, you could turn it into a document listing the links in the file. This is something that worked for me, but I look forward to feedback.

(1) Open this page: https://www.jeffersonscher.com/res/session-extract.html

(2) Click in the box to select the script there and copy it (either right-click > Copy or Ctrl+c)

(3) Open a new tab (Ctrl+t)

(4) Drag and drop the session history file you want to restore onto the new tab page to replace it with your session history file. If Firefox wants you to save it instead of display it in a tab, you may need to rename the file with a .json extension.

(5) Launch a new Scratchpad for that tab, using the Developer menu, either:

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

If that opens maximized, make it resizable and shrink it down a bit so you can see behind it.

(6) Paste the script you copied in step one at the bottom of the Scratchpad editing area, and click Run to run the script

(7) View the tab with your session history and click OK

Either a list will open in a new tab, or a popup blocker bar. If you get the popup blocker bar:

(A) Allow popups for the page (B) Then, if a duplicate tab opens, close the duplicate tab (C) Return to the Scratchpad and click Run again

(8) When you get your list in a new tab, you can save the page for future reference using Save Page As (right-click a blank area of the page, or use the File menu).

Sorry I can't make that easier at the moment.

Modified by jscher2000 - Support Volunteer

more options

I'm definitely going to look over the advice given here and see what shakes free, but I just wanted to say thank you to those who have replied so quickly and in great detail. Your help is very much appreciated regardless of the eventual outcome on my end.

more options

It's a lot to take and it must be so overwhelming and daunting.
But don't let it discourage you and feel free to ask as many questions as you like;   even if that means asking the same question over and over again.
Both   jscher  and   John99   will understand and talk you through it,   one step at a time.
Take your time and good luck   !

more options

jscher2000 said

If restoring the session history file is too daunting, you could turn it into a document listing the links in the file. This is something that worked for me, but I look forward to feedback. ....
(6) Paste the script you copied in step one at the bottom of the Scratchpad editing area, and click Run to run the script

In some Release profiles there is a warning about pasting into the scratchpad. That instructs you to type in allow, but unlike scratchpad error output which is remmed out that allow breaks the script until removed or reloaded.

(7) View the tab with your session history and click OK Either a list will open in a new tab, or a popup blocker bar. If you get the popup blocker bar: (A) Allow popups for the page (B) Then, if a duplicate tab opens, close the duplicate tab (C) Return to the Scratchpad and click Run again

Unsure why but in Release I still had the popup blocker bar. I could see the exception, and the popup bar had the option to block the update.js page. I temporarily turned off popup blocking as the quickest method of getting this to work.

That profile had ublock origin active and although set as disabled for this site on the upgrade.js file I did not actually try with ublock origin add-on disabled.

I am not sure such methods are easier than editing profile files, however it is safer, especially as some users will fail to make backups, or could make mistakes if using multiple profiles. Given how frequently these sorts of issues arise it could be worth considering a KB explanation and solution, but that's a different topic.

more options

It may be less of a pain to use a bookmarklet. This can be installed by dragging the blue button on the following page to the Bookmarks Toolbar or Bookmarks Menu. Then when you are viewing your session history file in a tab, you can click the button to run the extraction.

Note: If you use NoScript, you will need to enable scripts temporarily on the blank tab (about:blank), close that tab, then try again.

https://www.jeffersonscher.com/res/sumomarklets.html#SessExtr

more options

I want to say THANK YOU, THANK YOU, THANK YOU to jscher2000 for providing the script that solved my problem also. (I stupidly closed one of my session windows, and then opened a couple of popup windows in the other window, without thinking that it would make all the tabs in the closed window fall off the Open closed windows Menu list - I should KNOW that - I feel like an idiot)

Fortunately I had a saved session from an upgrade on 17th December - now all I have to do is check my history for about two weeks to see if I am missing anything added after the save date.

Thank You again, Kaelkitty.

PS: Now I am going to install Session Manager! Better late than never!

Modified by Kaelkitty