How to save about:config changes to disk without quit?

Discussion of general topics about Mozilla Firefox
Locked
Synthezoid
Posts: 12
Joined: July 24th, 2013, 6:18 pm

How to save about:config changes to disk without quit?

Post by Synthezoid »

I have a few userscripts that do a lot of writing to custom preferences in about:config for data storage. Unfortunately, due to Firefox's frequent slowdowns and freezes, I must often force-quit the program. This causes all my changes to be lost, because they are only stored to disk on successful normal quit of the program (a pretty foolish way of doing things, if you ask me, for as long as we live in an era where software still freezes and crashes.)

How can I get Firefox to save the preferences after I change them, so they won't be lost if the app freezes and must be force-quit later on? I'm open to javascript solutions if that's what it takes.
User avatar
malliz
Folder@Home
Posts: 43796
Joined: December 7th, 2002, 4:34 am
Location: Australia

Re: How to save about:config changes to disk without quit?

Post by malliz »

My guess is some of your custom userscripts are causing your frequent crashes as Firefox is usually pretty rock solid.
What sort of man would put a known criminal in charge of a major branch of government? Apart from, say, the average voter.
"Terry Pratchett"
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: How to save about:config changes to disk without quit?

Post by morat »

Synthezoid wrote:I'm open to javascript solutions if that's what it takes.

Code: Select all

Components.classes["@mozilla.org/preferences-service;1"].
  getService(Components.interfaces.nsIPrefService).
  savePrefFile(null);

https://developer.mozilla.org/docs/XPCOM_Interface_Reference/nsIPrefService#savePrefFile()
Synthezoid
Posts: 12
Joined: July 24th, 2013, 6:18 pm

Re: How to save about:config changes to disk without quit?

Post by Synthezoid »

malliz wrote:My guess is some of your custom userscripts are causing your frequent crashes as Firefox is usually pretty rock solid.
Been a few years but I just now saw this reply.

I don't know what you took me for, but of course I tested my userscripts on other browsers.

First of all, it's not possible to crash a "rock solid" browser from a plain-vanilla javascript userscript.
Second of all, do you really think I didn't test using both other script injection extensions and in totally different browsers before I knew it was because Firefox crashes a lot?
Third of all, Firefox, 6 years later in 2019, is still not 'rock solid', I get crashes pretty often. See "first of all", above.

Fourth of all, if you didn't have an answer to my question, why the heck did you waste your time and mine posting something that was both irrelevant and false? Did you think that criticism of Firefox (which was not even the main point of my post) was somehow aimed personally at you just because you yourself haven't experienced the problem being discussed?
User avatar
malliz
Folder@Home
Posts: 43796
Joined: December 7th, 2002, 4:34 am
Location: Australia

Re: How to save about:config changes to disk without quit?

Post by malliz »

A few years ? Try six. And I stand by everything I said then and I still say user error. I install Firefox for non techy people and it just works for them. Know why? they don't mess with it
What sort of man would put a known criminal in charge of a major branch of government? Apart from, say, the average voter.
"Terry Pratchett"
User avatar
DanRaisch
Moderator
Posts: 127186
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Re: How to save about:config changes to disk without quit?

Post by DanRaisch »

just because you yourself haven't experienced the problem being discussed?
Apparently few people are seeing that type of problem, or if they are they're not reporting it on these forums.
User avatar
therube
Posts: 21698
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: How to save about:config changes to disk without quit?

Post by therube »

(You guys just brought tears to my eyes. It's ALIVE.
Synthezoid was on FF 22, maliz on 25, morat on 17, & now we're up to posting with 68, lol.
Oh, & me, still not on FF ;-).)
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript
User avatar
lovemyfoxy
Posts: 2337
Joined: December 11th, 2009, 11:23 am
Location: USA

Re: How to save about:config changes to disk without quit?

Post by lovemyfoxy »

And I'm on 52.9ESR. If we didn't mess with it, most of Mz would be gone, and we'd all be bored. Or on Chrome, which is the same thing.
2 Desktops--Win 7 Ult.SP1 x64/6GB RAM /Firefox 52.9ESR/Waterfox64 2022.11/Thunderbird 52.9ESR/BitWarden PW Manager/Verizon FIOS wired network
User avatar
DanRaisch
Moderator
Posts: 127186
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Re: How to save about:config changes to disk without quit?

Post by DanRaisch »

And we're done here. Locking due to the age of the original posts and the attitudes of some individuals.
Locked