Can't restore session from saved copy of "sessionrestore.js"
My computer crashed due to another application, when I restarted it, FireFox had lost the sessions.
I located sessionrestore.bak, made another copy of that for safekeeping, then copied to sessionrestore.js, however when I restart FireFox and go to History > Restore Previous Session, it is not working, it does not restore the full session.
- I have opened the sessionrestore.bak and it DOES have my old session in it.
How can I get FireFox to read the sessionrestore file? Is there any way to select which file to use to restore the session?
Also - if I type in "about:sessionrestore" in the location bar, I get "the address isn't valid"
Thanks for any help...
所有回覆 (16)
Do you see about:sessionrestore on the about:about page?
You can check the browser.sessionstore.* prefs on the about:config page and reset user set (bold) browser.sessionstore.*prefs to the default value via the right-click context menu to make sure that Session Restore is enabled and working properly.
Did you check "History > Recently Closed Tabs/Windows"?
Yes, seeing "about:sessionrestore" on the "about:about" page, thanks.
I do see the "browse.sessionstore.*" prefs, they are set correctly.
I have a copy of the sessionrestore.bak file that I've tried copying to sessionrestore.js and then restarting FireFox.
What it is doing is ignoring sessionrestore.js and starting a new sessionrestore.js file and then the session to restore is just the FireFox startup page.
Also seeing "datareporting.sessions.*" settings, numers are from 32 - 36, not sure if maybe my sessionrestore.bak that I'm copying over to sessionrestore.js is out of sequence??
IE: datareporting.sessions.previous.35 and the string value includes the timestamp of each previous session.
Somehow I need it to recognize the sessionrestore.bak file... how can that be accomplished?
Thanks for any help...
The datareporting.* have to do with Firefox Health Report.
You can check out the link to the MozillaZine forum thread that I posted above to see if you can extract links from the sessionstore.bak file.
I opened both the sessionrestore.bak and sessionrestore.js and noticed that the last line of these files has the settings for session.
IE: "(session":{"state":"running","lastupdate":12345...,"starttime":12345....,"recentcrashes":1}...
In the "about:config", the values for datareporting.sessions.previous.## also have timestamps.
So it seems that this is an identifier ??
Is there a way to edit either the about:config or the sessionrestore.bak sessionrestore.js to match and then load the desired session??
Thanks for any help...
Try to change "state":"running" to "state":"stopped"
"state":"running" indicates that the session has crashed or didn't close properly.
Ok - which file to edit: sessionrestore.js or sessionrestore.bak
In the *.js file, it is "running" and in the *.bak file it's "stopped"
Would be nice if FireFox had the ability built in to present all sessionrestore files, ie the *.js, and then *bk1, *.bk2, etc. showing the dates and list of the browser windows and tabs...
Edited both the *.js and *.bak, tried setting both to "stopped" and "running", copied sessionrestore.bak to sessionrestore.js, but still not recognizing the sessionrestore.js ...
When I edit the *.bak, all my browser windows and tabs are in there...
(references to "sessionrestore.*" should be "sessionstore.*")
I have the sessionstore.bak file saved in another folder and have copied it over to the Profile folder as "sessionstore.js" and "sessionstore.bak".
But when I start FireFox, it overwrites "sessoinstore.js" with a new "sessionstore.js" file without my previous session windows or tabs.
Is there a way to go to "about:config" and edit the settings related to the session settings to recognize the sessionstore.bak and sessionstore.js without starting a new sessionstore.js file??
Thanks
The link to the previous post is not found...
Still need to retrieve my session am trying everything that I can think of - am a programmer so familiar with editing files, so far nothing seems to work...
Am hoping to find a solution editing the about:config session vars or editing the sessionstore.js file to match up to the config values and get it to recognize the file...
Does anything come up if you evaluate the JavaScript code in this post in the Browser/Error Console?
Copy and paste the JavaScript code in the Code input field in the Browser/Error Console (Firefox/Tools > Web Developer;Ctrl+Shift+J) and click the Evaluate button.
Ok - tried that - copied and pasted and clicked "evaluate", result:
Line 1 - Syntax error: invalid label
The line starts with:
{"windows":...
and the green arrow is pointing at either the " or the W...
由 sflc2000 於
Oddly, if I take the newly created sessionstore.js file, very short file, and put it in to evaluate, it gives the same error and at the same place (?)...
You shouldn't paste the content of the file in the Error Console, but the JavaScript code listed in the post in the forum thread that starts with "function linkify(event)" and evaluate that code.
Then you get a file picker where you can browse to the file and open it.
Ahh, ok, so it runs a script.
Ok, I tried both saved files, sessionstore.js and .bak, and it only shows:
window 1 tab 1 entries 1
Mozilla FireFox Start Page about:home
. . .
If I manually look at the files there are all my old windows and tabs.
Thank you for your efforts to help and for the extractor script, very nice! Something must be corrupted in my backup files.
Paging through the backup *.js and *.bak files, I see all the old URL's in there...
So although it will take time, I guess I can just go in and manually search (via TextPad or something) to locate my lost browsers and tabs, and just cut-n-paste until they are all reloaded.
It would not be so bad except that I was in the middle of working on a project and had several related browser windows and tabs open, so I do need to go through this grueling step.
Thanks and have a great day!
Do you use Windows 7? You may be able to do a systems restore like I did when the same happened to me the day before yesterday. Try Start > Help and Support > Type In "Restore" > "Restore Files From a Backup" > "Click To Open Backup and Restore." > (whatever recent dates are available) > Restore
I hope that that helps!