It's advisable to use a prefs.js for this sort of thing
You can store your custom preferences in user.js file - Firefox will copy those to prefs.js at startup.
From your link:
The user.js[1] file is optional. If you have one whenever the application is started it will overwrite any settings in prefs.js with the corresponding settings from user.js.
[1] https://kb.mozillazine.org/User.js_file