Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

Mozilla サポートの検索

サポート詐欺に注意してください。 私たちはあなたに通話やショートメッセージの送信、個人情報の共有を求めることはありません。疑わしい行為を見つけたら「迷惑行為を報告」からご報告ください。

詳しく学ぶ

このスレッドは閉じられ、アーカイブに保管されました。 必要であれば新たに質問してください。

Firefox restores tabs each time I restore the browser, setting is not turned on

  • 2 件の返信
  • 0 人がこの問題に困っています
  • 351 回表示
  • 最後の返信者: cor-el
  • 解決済み

When I open Firefox after starting my computer, all of my tabs from the previous session are automatically restored, and they take several minutes to load. I don't have the "Open previous windows and tabs" setting enabled. Is there a way to stop Firefox from loading these tabs each time I open the browser?

I'm using Firefox 103 on KDE neon 5.25.

When I open Firefox after starting my computer, all of my tabs from the previous session are automatically restored, and they take several minutes to load. I don't have the "Open previous windows and tabs" setting enabled. Is there a way to stop Firefox from loading these tabs each time I open the browser? I'm using Firefox 103 on KDE neon 5.25.

選ばれた解決策

Do you Quit Firefox (using the menu) at least 30 seconds before you shut down the computer? Firefox needs time for its file maintenance and recording that your session terminated normally. If Firefox doesn't find the entry indicating that it shut down normally, it will attempt an automatic crash recovery at the next startup.

The Linux version of Firefox also has an integration with the OS so if you shut down the OS without first quitting Firefox, when Firefox is instructed by the OS that it needs to close for a system shutdown, it sets a flag to restore your session at the next startup.

この回答をすべて読む 👍 1

すべての返信 (3)

選ばれた解決策

Do you Quit Firefox (using the menu) at least 30 seconds before you shut down the computer? Firefox needs time for its file maintenance and recording that your session terminated normally. If Firefox doesn't find the entry indicating that it shut down normally, it will attempt an automatic crash recovery at the next startup.

The Linux version of Firefox also has an integration with the OS so if you shut down the OS without first quitting Firefox, when Firefox is instructed by the OS that it needs to close for a system shutdown, it sets a flag to restore your session at the next startup.

See also these prefs on about:config that Firefox automatically sets.

  • browser.sessionstore.resume_session_once
  • browser.sessionstore.resuming_after_os_restart

To make this work properly you would have to use an autoconfig.cfg file to test whether we have a restart due to OS restart and if true, set both resuming_after_os_restart and resume_session_once prefs to false. That way you can still have a valid restart to apply an update that keeps your session.

onQuitApplication:


You can use the autoconfig.cfg file in the Firefox installation folder to initialize (set/lock) preferences and run privileged JavaScript code.

To use Autoconfig, place two files into the Firefox installation directory.

  • on Windows and Linux, they go into the same directory where Firefox is installed
  • on macOS, they go into the Contents/Resources directory of the Firefox.app

The autoconfig.js file that specifies to use autoconfig.cfg is placed into the "defaults/pref" directory where the channel-prefs.js file is located. The autoconfig.cfg file is placed at the top level of the Firefox directory.

  • autoconfig.cfg and autoconfig.js need to start with a comment line (//)
  • autoconfig.js needs to use Unix line endings (LF instead of CR/LF)

See also:


The content of autoconfig.js:

//
pref("general.config.filename", "autoconfig.cfg");
pref("general.config.obscure_value", 0);
pref("general.config.sandbox_enabled", false);

The content of autoconfig.cfg:

// autoconfig.cfg need to start with a comment line
// autoconfig.js => pref("general.config.sandbox_enabled", false);
var Services = globalThis.Services || ChromeUtils.import("resource://gre/modules/Services.jsm").Services;

if (Services.appinfo.restartedByOS) {
 Services.prefs.setBoolPref("browser.sessionstore.resume_session_once", false);
 Services.prefs.setBoolPref("browser.sessionstore.resuming_after_os_restart", false);
}

この投稿は cor-el により に変更されました

This question has been locked because the original author has deleted their account. While you can no longer post new replies, the existing content remains available for reference.