ابحث في الدعم

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 utilize previous.js or restore.js to recover tabs/groups?

  • 4 ردود
  • 4 have this problem
  • 8 views
  • آخر ردّ كتبه cor-el

more options

Hello, I would greatly appreciate any help. I have VERY important tabs (over 150) and put into groups using TabGroupsHelper. My firefox session closed and when it opened I had only a single page. ...I'm sure you have heard that before. :) I'm not sure if I opened/closed FF too many times before making a backup of the session files,...however, the "restore previous session" is greyed out, bummer :( I do have backups of restore.js and previous.js and ATTEMPTED to copy the restore.js to the profile folder, which I assume is one level up??? I renamed it sessionstore.js and restart FF, However FF appears to delete the sessionstore.js file.  :( I tried this a second time because I was not sure it deleted it...but indeed it did I watched it go bye bye. :) So, to ease my mind a bit I opened the copied restore.js in word and I am able to see it contains the latest tabs and group from earlier today. Is there a way I can use this file to recover the session tabs/groups? Did I place the file in the proper folder (its under >>Appdata, Roaming, Mozilla, FF, Profiles, a78smah2.default) before renaming it to sessionstore.js? So to be clear, I placed it in the "a78smah2.default" folder...is this correct? Thanks for any guidance you can provide, I would be deeply grateful!!

Hello, I would greatly appreciate any help. I have VERY important tabs (over 150) and put into groups using TabGroupsHelper. My firefox session closed and when it opened I had only a single page. ...I'm sure you have heard that before. :) I'm not sure if I opened/closed FF too many times before making a backup of the session files,...however, the "restore previous session" is greyed out, bummer :( I do have backups of restore.js and previous.js and ATTEMPTED to copy the restore.js to the profile folder, which I assume is one level up??? I renamed it sessionstore.js and restart FF, However FF appears to delete the sessionstore.js file. :( I tried this a second time because I was not sure it deleted it...but indeed it did I watched it go bye bye. :) So, to ease my mind a bit I opened the copied restore.js in word and I am able to see it contains the latest tabs and group from earlier today. Is there a way I can use this file to recover the session tabs/groups? Did I place the file in the proper folder (its under >>Appdata, Roaming, Mozilla, FF, Profiles, a78smah2.default) before renaming it to sessionstore.js? So to be clear, I placed it in the "a78smah2.default" folder...is this correct? Thanks for any guidance you can provide, I would be deeply grateful!!

All Replies (4)

more options

Did you check the content of the file in a text editor to make sure the file isn't corrupted?

If you replace a sessionstore.js file with an undamaged file from the sessionstore-backups folder like restore.js then this should recover that session.


A possible way to inspect a sessionstore.js file or a file in the sessionstore-backups folder is opening the file in a Firefox tab and evaluate this JavaScript code in the Web Console (Firefox/Tools > Web Developer). Paste the code in the command line of the Web Console and press the Enter key to evaluate the code.


eval("ss = "+document.body.innerHTML.replace("<pre>","").replace("</pre>",""));
sd='';
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];
 sd+="["+(i+1)+"]:"+"<a href="+last.url+">"+last.url+"</a><br />";
}
document.body.innerHTML=sd;
more options

Hello Core-El, thank you for the prompt reply. I haven't programmed in almost 20 years so some of this is foreign to me :) I was able to open in a text editor but I really don't know what to look for to determine if the file is corrupted. What I can say is I knew the previous tabs/groups I had created and they are all in the file. However, when I replace the sessionstore.js with previous.js or restore.js it does *not* open any of the previous tabs which I know are in the file, it's like it's starting a new session. I did as you requested and opened web console and the output I received is in the attached file. Not to be disrespectful to you in any manner, but I'm more than a little astonished that the developers of FireFox would only save the last two sessions in "memory"..basically users can't open a session after crash or it will overwrite and lose their session history....considering how often firefox must be shut down for its excessive use of memory...it seems that the developers are a little out of touch with their users and not respecting their time by not have a solution like "Session manager" embedded within its capabilities. I have learned the hard way :) to ALWAYS utilize Session Manager .. however, in this case I was on a new PC and it was not utilized. So anyone reading this I would encourage them to use Session Manager add-on app or something similar. So back to the matter at hand, I'm still not sure if the file is corrupted, is there any way to retrieve the tabs/groups info considering the output I received from inspecting the file? I'm happy to share the file if it will help as well. Please advise and thank you again for taking the time to assist me.

more options

Hello Cor-El, I understand you are very busy and appreciate your insights and assistance. I am sure this issue is something many users face, unfortunately. So I followed your directions above, is there a way to tell if the file is corrupt, and if it is or isn't, is there a way to recover the tabs/groups within the restore.js file? Look forward to hearing from you, Thanks!

more options

I've never used tab groups, so I don't know how they show in the sessionstore.js file.

The docs doesn't mention tab groups, so you would have to check that out yourself.