为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

how to restore the precedent session from a sessionstore.bak file

  • 9 个回答
  • 9 人有此问题
  • 2 次查看
  • 最后回复者为 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?

被采纳的解决方案

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

定位到答案原位置 👍 4

所有回复 (9)

more options

选择的解决方案

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 />"); }

由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!