搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Firefox keeps asking if I want to restore previous session

  • 19 回覆
  • 3 有這個問題
  • 1 次檢視
  • 最近回覆由 dumdidadida

more options

Firefox keeps asking if I want to restore the previous session and this has been a problem since Firefox 4.

I have told Firefox to not save any history or cookies and also clear everything when Firefox closes, I have told it to show my homepage when Firefox is starting and I have tried deleting sessionstore.js. I use the following settings in about:config

browser.sessionstore.max_tabs_undo 0 browser.sessionstore.max_windows_undo 0

browser.sessionstore.privacy_level 2 browser.sessionstore.privacy_level_deferred 2 browser.sessionstore.resume_from_crash false

I'm currently using Firefox 15 beta with no add-ons on Windows Vista. Firefox sometimes doesn't ask if I want to restore the session, but only if I did close it from the drop down menu and not the x button. Firefox is closing properly.

Thanks in advance.

Firefox keeps asking if I want to restore the previous session and this has been a problem since Firefox 4. I have told Firefox to not save any history or cookies and also clear everything when Firefox closes, I have told it to show my homepage when Firefox is starting and I have tried deleting sessionstore.js. I use the following settings in about:config browser.sessionstore.max_tabs_undo 0 browser.sessionstore.max_windows_undo 0 browser.sessionstore.privacy_level 2 browser.sessionstore.privacy_level_deferred 2 browser.sessionstore.resume_from_crash false I'm currently using Firefox 15 beta with no add-ons on Windows Vista. Firefox sometimes doesn't ask if I want to restore the session, but only if I did close it from the drop down menu and not the x button. Firefox is closing properly. Thanks in advance.

由 Silje 於 修改

所有回覆 (19)

more options

Hi,

You can try to Reset all user preferences to Firefox defaults: and Make Changes and Restart in the Safe Mode start screen.

more options

Thanks for your answer. It didn't work though. This evening it works properly rather often even if I close Firefox with the x button, but most of the times it asks me if I want to restore the session.

more options

It is possible that there is a problem with the files sessionstore.js and sessionstore.bak in the Firefox Profile Folder.

Delete the sessionstore.js file and possible sessionstore-##.js files with a number and sessionstore.bak in the Firefox Profile Folder.

Deleting sessionstore.js will cause App Tabs and Tab Groups and open and closed (undo) tabs to get lost, so you will have to create them again (make a note or bookmark them).

more options

Thanks for your answer.

As I mentioned I have already tried to delete sessionstore.js (I don't have any other sessionstore. files) and it doesn't help. I tried it again.

I never had this problem with Firefox 2, 3 and not with Iceweasel. It's like Firefox is ignoring my settings... or I have messed them up somehow.

more options
more options

Thanks, but it didn't help either.

more options

Try browser.sessionstore.restore_on_demand to FALSE.

more options

Additionally, you can also consider the Reset Firefox feature via Help (Alt + H) > Troubleshooting Information.

(To revert to the previous profile you were using, close the new profile (i.e. exit Firefox), start Firefox and choose the Default User profile. While the Profile Manager is open, you can also delete the newly reset profile (the one containing random numbers), or the former profile, as the case may be).

Managing profiles

Profiles Howto

After the reset please also check if there is any user.js file in the newly created Profile Folder. To open the profile folder via Firefox: Help (Alt + H) > Troubleshooting Information > Show Folder.

Firefox Profile Folder & Files

由 dumdidadida 於 修改

more options

Thanks. Actually I have tried that already, didn't work.

I think that I really shouldn't need to change preferences in about:config at all when I have told it to clear cookies and cache when quitting. It should clear everything when told to do so.

dumdidadida:, thanks, I will try it later.

由 Silje 於 修改

more options

No, didn't help =(

more options

If you have security software (antivirus, firewall etc.) installed, you can try deleting all existing instances of Firefox and its related files in all the different configuration areas/modules of the security software. Instead create new allow/trusted rules for Firefox + its related processes. Even otherwise the security software may also ask again when Firefox is started and you can try to allow/trust at that time. Please see this.

AV/Firewalls Configuration

more options

Thanks again. No, I don't have a security software.

I think this is a bug and it has something to do with session restore. Am I really the only one with this problem? What I find strange is that Firefox is sometimes working properly.

But perhaps Firefox since version 4 is supposed to work this way, be able to restore sessions even if you cleared everything, cookies, cache and so on? I hope not because I think it's a privacy problem.


Found another thread about this, don't know if they solved it though: http://support.mozilla.org/en-US/questions/802412

I have seen other threads about it before, they seemed to solve the problem with add-ons which I think is ... not very good.

由 Silje 於 修改

more options

Not sure if there are specific unresolved bugs in Firefox related to this. You can also try searching here.

Can you also please check about:crashes in the location (address) bar to see if any irregular silent crashes at shutdown have been recorded before this issue occurs. You may also want to do an Error-checking of the drive that includes the Firefox profile folder by right-clicking on it in Computer > Properties > Tools > Check now with the defaults.

more options

Thanks again. There where no disk errors and no crashes.

I searched for a similar bug, but couldn't find one that was exactly like it is for me. However from reading similar bugs it seems like clearing cookies, cache and so on does not clear session cookies. Perhaps it's meant to be that way, but I think if you want to clear everything, you probably want to clear session cookies too.

For me Firefox is ignoring my settings in about:config which has to do with session restore.

由 Silje 於 修改

more options

Is it an external dialog?? Can you also please create a screenshot of the problem you're seeing by following the guide mentioned at How do I create a screenshot of my problem?.

Once you've done this, attach the saved screenshot file to your forum post by clicking the Browse... button below the Post your reply box. You really help us to visualize the problem.

more options

The first image shows what it looks when I start Firefox, the other two are my settings.

more options

Actually selecting Browsing History in the Privacy tab Settings should suffice in the normal case (ie. no crashes, add-on installation etc.). No need of the changes in about:config. If this issue is happening in the default new profile (i.e after selecting to Clear history when Firefox Closes + Browsing History, and no other changes) as well you can check if the preference to Clear History When Firefox Closes and its Settings (privacy.clearOnShutdown.history - true) have been written to in the prefs.js file in the profile folder. If so, then you could consider filing a bug report.

由 dumdidadida 於 修改

more options

There is need to change in about:config. Clearing cookies doesn't clear session cookies since Firefox 4:

https://bugzilla.mozilla.org/show_bug.cgi?id=529899

https://bugzilla.mozilla.org/show_bug.cgi?id=662485

I don't have privacy.clearOnShutdown.history in prefs.js, because true is default? It doesn't seem to write to prefs.js if I didn't change from default. I can see it in about:config though.

由 Silje 於 修改

more options

Okay, that's true. What I meant was that keeping Browsing History selected under Settings in Tools > Options > Privacy as shown in the second image above shouldn't enable the active Restore previous session as shown in the first image above in a default new profile. i.e. the active tabs in the previous sessions aren't recoverable.