Mozilla VPN is currently experiencing an outage. Our team is actively working to resolve the issue. Please check the status page for real-time updates. Thank you for your patience.

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

搜索 | 用户支持

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

详细了解

Can't disable session restore

  • 5 个回答
  • 1 人有此问题
  • 1 次查看
  • 最后回复者为 cor-el

more options

Firefox Quantum 65.0; Windows 10 Pro; Grammarly, OneTab, RES, uBlock Origin

since about a week ago firefox always saves the open tabs and opens them after restarting the browser. It happens automatically and I can't stop firefox from doing so. I want every tab to be closed when I shut down firefox and they shouldn't automatically be reopened.

The box for Session Restore is unchecked and in about:config browser.sessionstore.max_resumed_crashes is set to zero and firefox still automatically restores the sessions

Firefox Quantum 65.0; Windows 10 Pro; Grammarly, OneTab, RES, uBlock Origin since about a week ago firefox always saves the open tabs and opens them after restarting the browser. It happens automatically and I can't stop firefox from doing so. I want every tab to be closed when I shut down firefox and they shouldn't automatically be reopened. The box for Session Restore is unchecked and in about:config browser.sessionstore.max_resumed_crashes is set to zero and firefox still automatically restores the sessions
已附加屏幕截图

由Vulkanodox于修改

被采纳的解决方案

Update/solution: There is a user.js file in my profile's folder. I did not create it. The firefox documentation states that it doesnt exist by default, it has to be created. http://kb.mozillazine.org/User.js_file

Content of the user.js file:

   user_pref("extensions.blocklist.enabled",false);
   user_pref("extensions.blocklist.interval",31536000);
   user_pref("extensions.blocklist.url","");
   user_pref("extensions.blocklist.itemURL","");
   user_pref("extensions.blocklist.detailsURL","");
   user_pref("security.mixed_content.block_active_content",false);
   user_pref("security.mixed_content.block_display_content",false);
   user_pref("app.update.staging.enabled",true);
   user_pref("browser.safebrowsing.appRepURL","");
   user_pref("app.update.silent",true);
   user_pref("browser.safebrowsing.updateURL","");
   user_pref("browser.safebrowsing.reportURL","");
   user_pref("browser.safebrowsing.reportMalwareURL","");
   user_pref("browser.safebrowsing.reportMalwareErrorURL","");
   user_pref("browser.safebrowsing.malware.reportURL","");
   user_pref("services.sync.prefs.sync.browser.safebrowsing.enabled",false);
   user_pref("services.sync.prefs.sync.browser.safebrowsing.malware.enabled",false);
   user_pref("browser.sessionstore.resume_session_once", true);
   user_pref("browser.sessionstore.resume_session_once", true);
   user_pref("browser.sessionstore.resume_session_once", true);
   user_pref("browser.sessionstore.resume_session_once", true);
   user_pref("browser.sessionstore.resume_session_once", true);
   user_pref("browser.sessionstore.resume_session_once", true);
   user_pref("browser.sessionstore.resume_session_once", true);

and there is the problem. After deleting all the "user_pref("browser.sessionstore.resume_session_once", true);" lines but one and setting the remaining one to false my problem was solved. I guess some extension or plugin created this file and since it overrides any other change it didn't matter what setting I would change in the browser itself.

In the end, I set the user.js file to read-only to prevent this from happening again.

定位到答案原位置 👍 0

所有回复 (5)

more options

You may have corrupt sessionstore [v56] sessionstore.jsonlz4 file(s). Delete all sessionstore* files and the sessionstore-backups folder.

Type about:support<enter> in the address bar.

Under the page logo on the left side, you will see Application Basics. Under this find Profile Folder. To its right press the button Show Folder. This will open your file browser to the current Firefox profile. Now Close Firefox.

Linux: Under the page logo on the left side, you will see Application Basics. Under this find Profile Directory. To its right press the button Open Directory.

Locate the above file. Then rename or delete it. Restart Firefox.


Don't delete the files if you need to rescue any data from them, just move them out of the profile folder to some location where Firefox doesn't look for them. You can try to read out their contents using this tool: https://www.jeffersonscher.com/res/scrounger.html

more options

FredMcD said

You may have corrupt sessionstore [v56] sessionstore.jsonlz4 file(s). Delete all sessionstore* files and the sessionstore-backups folder. Type about:support<enter> in the address bar. Under the page logo on the left side, you will see Application Basics. Under this find Profile Folder. To its right press the button Show Folder. This will open your file browser to the current Firefox profile. Now Close Firefox. Linux: Under the page logo on the left side, you will see Application Basics. Under this find Profile Directory. To its right press the button Open Directory. Locate the above file. Then rename or delete it. Restart Firefox. Don't delete the files if you need to rescue any data from them, just move them out of the profile folder to some location where Firefox doesn't look for them. You can try to read out their contents using this tool: https://www.jeffersonscher.com/res/scrounger.html

there are no sessionstore* files in this folder, only previous* and recovery*

more options

选择的解决方案

Update/solution: There is a user.js file in my profile's folder. I did not create it. The firefox documentation states that it doesnt exist by default, it has to be created. http://kb.mozillazine.org/User.js_file

Content of the user.js file:

   user_pref("extensions.blocklist.enabled",false);
   user_pref("extensions.blocklist.interval",31536000);
   user_pref("extensions.blocklist.url","");
   user_pref("extensions.blocklist.itemURL","");
   user_pref("extensions.blocklist.detailsURL","");
   user_pref("security.mixed_content.block_active_content",false);
   user_pref("security.mixed_content.block_display_content",false);
   user_pref("app.update.staging.enabled",true);
   user_pref("browser.safebrowsing.appRepURL","");
   user_pref("app.update.silent",true);
   user_pref("browser.safebrowsing.updateURL","");
   user_pref("browser.safebrowsing.reportURL","");
   user_pref("browser.safebrowsing.reportMalwareURL","");
   user_pref("browser.safebrowsing.reportMalwareErrorURL","");
   user_pref("browser.safebrowsing.malware.reportURL","");
   user_pref("services.sync.prefs.sync.browser.safebrowsing.enabled",false);
   user_pref("services.sync.prefs.sync.browser.safebrowsing.malware.enabled",false);
   user_pref("browser.sessionstore.resume_session_once", true);
   user_pref("browser.sessionstore.resume_session_once", true);
   user_pref("browser.sessionstore.resume_session_once", true);
   user_pref("browser.sessionstore.resume_session_once", true);
   user_pref("browser.sessionstore.resume_session_once", true);
   user_pref("browser.sessionstore.resume_session_once", true);
   user_pref("browser.sessionstore.resume_session_once", true);

and there is the problem. After deleting all the "user_pref("browser.sessionstore.resume_session_once", true);" lines but one and setting the remaining one to false my problem was solved. I guess some extension or plugin created this file and since it overrides any other change it didn't matter what setting I would change in the browser itself.

In the end, I set the user.js file to read-only to prevent this from happening again.

more options

That was very good work. Well done.

more options

If you didn't create the user.js file yourself then you should remove this file. It is likely added by other software without informing you.