Windows 10 reached EOS (end of support) on October 14, 2025. For more information, see this article.

搜尋 Mozilla 技術支援網站

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

了解更多

Disabling Tab Restore on OS Restart

  • 1 回覆
  • 1 有這個問題
  • 5 次檢視
  • 最近回覆由 firefoxuser

更多選項

I'm trying to stop Firefox from restoring tabs after I restart my OS. So far, I've done the following:

  • Disabled `Startup > Open Previous Windows and Tabs`
  • Disabled all extensions
  • Confirmed I do not have a `user.js` file
  • Set `browser.sessionstore.resume_from_crash` to `false`
  • Set `browser.sessionstore.restore_on_demand` to `false`
  • Set `browser.sessionstore.resuming_after_os_restart` to `false` (It was already set this way.)
  • Set `browser.sessionstore.max_resumed_crashes` to `0`
  • Set `privacy.clearOnShutdown.openWindows` to `true`
  • Set `browser.sessionstore.max_tabs_undo` to `0`
  • Set `browser.sessionstore.max_windows_undo` to `0`

(I've since reverted the last two and the extension changes after they didn't work.)

So far, Firefox will not restore tabs on application restart (manually closing and relaunching) or on crashing (after sending SIGTERM/SIGKILL), but it still restores tabs after restarting the OS (if I allow the OS to kill it during shutdown). I've seen a couple suggestions to disable history completely, but I do occasionally refer to my browsing history, so I'd prefer a less-drastic approach. Ideally, I just want Firefox to treat the first launch after a shutdown as a normal launch and not apply any special behavior. Any help would be much appreciated!

System: Fedora 42 (Workstation Edition) Running Firefox 144.0.2 on Gnome 48.6-1.fc42

I'm trying to stop Firefox from restoring tabs after I restart my OS. So far, I've done the following: * Disabled `Startup > Open Previous Windows and Tabs` * Disabled all extensions * Confirmed I do not have a `user.js` file * Set `browser.sessionstore.resume_from_crash` to `false` * Set `browser.sessionstore.restore_on_demand` to `false` * Set `browser.sessionstore.resuming_after_os_restart` to `false` (It was already set this way.) * Set `browser.sessionstore.max_resumed_crashes` to `0` * Set `privacy.clearOnShutdown.openWindows` to `true` * Set `browser.sessionstore.max_tabs_undo` to `0` * Set `browser.sessionstore.max_windows_undo` to `0` (I've since reverted the last two and the extension changes after they didn't work.) So far, Firefox will not restore tabs on application restart (manually closing and relaunching) or on crashing (after sending SIGTERM/SIGKILL), but it still restores tabs after restarting the OS (if I allow the OS to kill it during shutdown). I've seen a couple suggestions to disable history completely, but I do occasionally refer to my browsing history, so I'd prefer a less-drastic approach. Ideally, I just want Firefox to treat the first launch after a shutdown as a normal launch and not apply any special behavior. Any help would be much appreciated! System: Fedora 42 (Workstation Edition) Running Firefox 144.0.2 on Gnome 48.6-1.fc42

被選擇的解決方法

So... I managed to figure this out immediately after posting... The "See Also" section of this forum found what the search bar and google could not!

For anyone else who finds this: Relevant Thread Bugzilla Issue

My fix: To get around the underlying behavior, I went to the profile directory (Help > More Troubleshooting Information > Profile Directory) and created a `user.js` file with the following content: ```

user_pref("browser.sessionstore.resume_session_once", false);

``` This reverts Firefox's settings change every time the browser is launched. This probably breaks some other features (like tab restore when loading into debug mode), so use with caution. I'll maybe try to see if I can find a way to set this through a script that I can run on startup, but for now, this solves my problem.

從原來的回覆中察看解決方案 👍 0

所有回覆 (1)

更多選項

選擇的解決方法

So... I managed to figure this out immediately after posting... The "See Also" section of this forum found what the search bar and google could not!

For anyone else who finds this: Relevant Thread Bugzilla Issue

My fix: To get around the underlying behavior, I went to the profile directory (Help > More Troubleshooting Information > Profile Directory) and created a `user.js` file with the following content: ```

user_pref("browser.sessionstore.resume_session_once", false);

``` This reverts Firefox's settings change every time the browser is launched. This probably breaks some other features (like tab restore when loading into debug mode), so use with caution. I'll maybe try to see if I can find a way to set this through a script that I can run on startup, but for now, this solves my problem.

由 firefoxuser 於 修改

問個問題

如果您還沒有帳號,您必須先登入帳號 來回覆文章。還沒有帳號的話,只能發問新問題