Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

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 to restore the precedent session from a sessionstore.bak file

  • 9 replies
  • 9 have this problem
  • 2 views
  • Last reply by tealady

more options

When I tried to open firefox it automatically updated and supressed the sessionstore.js file. I saved the sessionstore.bak into another folder, closed mozilla, changed the extension bak to js in the "profiles" folder of firefox and opened it again but nothing happened. Though the sessionstore.bak file is 13Ko big and seems to contain all the links of my previous session.

How could I force Firefox to start a session using the information in the sessionstore.bak or .js file as it should?

When I tried to open firefox it automatically updated and supressed the sessionstore.js file. I saved the sessionstore.bak into another folder, closed mozilla, changed the extension bak to js in the "profiles" folder of firefox and opened it again but nothing happened. Though the sessionstore.bak file is 13Ko big and seems to contain all the links of my previous session. How could I force Firefox to start a session using the information in the sessionstore.bak or .js file as it should?

Chosen solution

Hello lordsilver2, the method you tried is the correct, if doesn't work maybe the sessionstore.bak (renamed to sessionstore.js) is corrupted.

First make a copy of the file (the renamed sessionstore.js) to your desktop and then try to create a new profile and move the copy in the new profile to see if that works. If the file is corrupted it is not sure that the above works.


thank you

Read this answer in context 👍 4

All Replies (9)

more options

Chosen Solution

Hello lordsilver2, the method you tried is the correct, if doesn't work maybe the sessionstore.bak (renamed to sessionstore.js) is corrupted.

First make a copy of the file (the renamed sessionstore.js) to your desktop and then try to create a new profile and move the copy in the new profile to see if that works. If the file is corrupted it is not sure that the above works.


thank you

more options

Did you check for recently closed tabs and windows with that restored sessionstore.js file?

See also this MozillaZine forum thread.

more options

My way:

  1. Open a sessionstore.js file in a browser. It can be a different browser (Chrome) if you like.
  2. Open Firebug/Inspector.
  3. Type: eval("ss = "+document.body.innerText);
  4. Type: for (var i = 0; i < ss.windows[0].tabs.length; i++) { var ent = ss.windows[0].tabs[i].entries; var last = ent[ent.length-1]; document.write("<a href="+last.url+">"+last.url+"</a>
    "; }

Enjoy all tabs from sessionstore on your screen. You only need to Ctrl-click them one by one.

more options

Hi spidgorny

I'm having the same problem as OP but the other suggestions haven't worked for me. I'd like to try yours but am utterly clueless when it comes to inspector.

Where exactly do I type the text that you suggest? In one of the two white boxes at the bottom of the screen (screen shot attached)? Neither of the white boxes has a cursor, or anything else that makes it patently obvious that text may be entered there. Waaaaaaaaaaay out of my depth here!

more options

@tealady: you're almost there. I've used the Web-Inspector in Chrome, but Firefox Inspector should work as well. Just click on the first tab "Web Console" - there you can type the code. Let me know if it's not working.

more options

@spidgorny, thank you so much for replying.  :-) Not having much luck with that. After typing

eval("ss = "+document.body.innerText);

it returns the message

undefined.

After I enter

for (var i = 0; i < ss.windows[0].tabs.length; i++) { var ent = ss.windows[0].tabs[i].entries; var last = ent[ent.length-1]; document.write("<a href="+last.url+">"+last.url+"</a> "; }'

I get the message

SyntaxError: unterminated string literal.

Am I doing something daft?  :-)

more options

OK, for Firefox the lines are:

eval("ss = "+document.body.innerHTML.replace("<pre>", "").replace("</pre>", ""));

and

for (var i = 0; i < ss.windows[0].tabs.length; i++) { var ent = ss.windows[0].tabs[i].entries; var last = ent[ent.length-1]; document.write("<a href="+last.url+">"+last.url+"</a><br />"); }

Modified by cor-el

more options
  • There's a <pre> and </pre> inside the replace() function, which are being corrupt by the commenting system here.
more options

Okay, the first line of code seems to have worked, but when I enter the second one it returns the messages

for (var i = 0; i < ss.windows[0].tabs.length; i++) { var ent = ss.windows[0].tabs[i].entries; var last = ent[ent.length-1]; document.write("<a href="+last.url+">"+last.url+"</a>
"); }

and

TypeError: ss.windows[0] is undefined

Having computer problems and might not be back on tonight but will check in the morning. Thank you again for your continued help!