Changed preferernce in configuration gets reverted after Firefox restart
I want to change "browser.sessionstore.resume_session_once" preference to true. So I do it in about:config page and if I reaccess this page in another tab within the session, then my value is being kept.
However, when I restart Firefox (thru "Exit" in "File" menu), all previous pages get restored and that preference is "false" again in the config after a new browser start.
I also made a user.js file with the following content: // user_pref("browser.startup.couldRestoreSession.count", 0); user_pref("browser.sessionstore.resume_session_once",true);
Nothing helps.
Please let me know how I can modify the config file.
Thank you!
All Replies (5)
Hi, that is normal for the "once" preference because it is meant to be turned off after the "once" occurs.
The user.js file should work -- if FIrefox is reading it. If you check the Troubleshooting Information page, does it indicate that Firefox is finding a user.js file? More info on how to get to that page: Use the Troubleshooting Information page to help fix Firefox issues. Once it's open, you can use Ctrl+F to look for user.js at the bottom of the "Important Modified Preferences" section.
If Firefox isn't finding it:
(A) Make sure it is in your currently active profile folder. The Open Folder button on the "Profile Folder" row of the Troubleshooting Information page will get you there.
(B) Make sure Windows isn't hiding a .txt extension after the .js. On Windows 11, there should be a bar above the file list with "View" (drop that, click Show, then enable showing file extensions) or "..." (drop that, Options, View tab, then find the checkbox to enable showing file extensions).
jscher2000 - Support Volunteer said
... Troubleshooting Information page, does it indicate that Firefox is finding a user.js file?
It just shows:
user.js Preferences Your profile folder contains a user.js file, which includes preferences that were not created by Firefox.
Usually user.js is a link. If you click the link, does it look the way you expect?
By the way, why use this preference instead of changing the startup setting? That's either the first part of the Settings page or, if you are editing preferences, browser.startup.page set to 3 instead of 1.
Firefox should restore the session with the pref set to true, but you won't see this in about config because Firefox will set the pref to false once the session is restored before you can open about:config to inspect the pref.
Isn't Firefox restoring the session?
Use one of these to close Firefox if you are currently doing that by clicking the close X on the Firefox Title bar, especially if you have multiple windows or Private Browsing windows open to prevent losing tabs in unnoticed windows.
- "3-bar" menu button -> Exit (Power button)
- Windows: File -> Exit
- Mac: Firefox -> Quit Firefox
- Linux: File -> Quit
In case of issues you can check "History -> Restore Previous Session" and "History -> Recently Closed Windows/Tabs".
In case you use "Clear history when Firefox closes" or otherwise clear history.
- do not clear the "Browsing history"
- Settings -> Privacy & Security
Firefox will: "Use custom settings for history":
[X] "Clear history when Firefox closes" -> Settings - https://support.mozilla.org/en-US/kb/delete-browsing-search-download-history-firefox
- using "Clear history when Firefox closes" in Firefox 102+ honors exceptions and keeps cookies with an allow exception, previous versions removed all cookies
- clearing "Site settings" clears exceptions for cookies, images, pop-up windows, and software installation and exceptions for passwords and other website specific data
jscher2000 - Support Volunteer said
Usually user.js is a link. If you click the link, does it look the way you expect? By the way, why use this preference instead of changing the startup setting? That's either the first part of the Settings page or, if you are editing preferences, browser.startup.page set to 3 instead of 1.
Yes, thank you, that was what I had found on the internet and it solved the problem.
Modified