Yes, but that is not what I’m talking about. What I mean is that when Firefox is running and you go to change some setting in say, Settings page, then the new value for that preference is stored into prefs.js (at latest on Firefox shutdown, it might remain only in-memory for some time I’m not sure). Anyway, the new value persists only for that browser session, because on next startup whatever value was set by user.js will override it.
Sure. For simplified example have only the following in your user.js file:
user_pref("browser.tabs.warnOnClose",true);
Start Firefox
Observe that the pref is indeed true
Go to Setting > General, observe that Confirm before closing multiple tabs is checked
Uncheck the option
In about:config observe that browser.tabs.warnOnClose is now false
Restart Firefox
Observe that the pref is again set to true
The reason is also very simple. Firefox will never write anything to user.js - thus any changes you do at runtime will only be stored to prefs.js. However, user.js always overrides prefs.jsat startup.
Yes. Firefox doesn’t create user.js file itself - if you want one then you need to create it yourself either manually or with some tool. Also, I’ve seen some “security” software create user.js file without notifying the user about it…
Yes, but that is not what I’m talking about. What I mean is that when Firefox is running and you go to change some setting in say, Settings page, then the new value for that preference is stored into prefs.js (at latest on Firefox shutdown, it might remain only in-memory for some time I’m not sure). Anyway, the new value persists only for that browser session, because on next startup whatever value was set by user.js will override it.
Have you independently confirmed this?
What is preventing
user.js
from doing exactly what you’re describing right now on your system?Sure. For simplified example have only the following in your
user.js
file:user_pref("browser.tabs.warnOnClose",true);
Confirm before closing multiple tabs
is checkedbrowser.tabs.warnOnClose
is now falsetrue
The reason is also very simple. Firefox will never write anything to
user.js
- thus any changes you do at runtime will only be stored toprefs.js
. However,user.js
always overridesprefs.js
at startup.Understood, thanks. So on a clean install, I’m assuming
user.js
is either empty or missing, correct?Yes. Firefox doesn’t create user.js file itself - if you want one then you need to create it yourself either manually or with some tool. Also, I’ve seen some “security” software create user.js file without notifying the user about it…