From MozillaZine Knowledge Base
This article deals with changes to options or preference settings not being saved after you restart your Mozilla application. If Firefox toolbar customizations are not being saved, see this article.
Read-only or locked preference file
The inability to save any preference changes can be caused by having a read-only or locked prefs.js file or "prefs.js.moztmp" file in the profile folder. You may receive an error similar to "Failed to save the preferences file. Any preference changes will be lost at the end of the session" . You may also find multiple files named "prefs-<n>.js" (where <n> is a number) in the profile folder. Check the file properties of the prefs.js file (and "prefs.js.moztmp" file, if found) and make sure that the "read-only" attribute is not set. See Multiple profile files created for additional information.
Corrupt or damaged prefs.js file
If the prefs.js file is corrupt or damaged to the exent that it is no longer writable, it can prevent preference changes from being saved.   In such cases you will need to replace the corrupt or damaged file. Close your Mozilla application (if open) and,
- If you have a current profile backup, replace the prefs.js file in your profile folder with the backup copy.
- If you have no backup, open the profile folder and rename prefs.js to prefs.jsOLD. A new prefs.js file will be generated when you next open your Mozilla application. (You can alternately use the Firefox Safe Mode option, "Reset all user preferences to Firefox defaults" to rebuild the prefs.js file from program defaults, the same as if you manually deleted the file.) All preferences will be reset to default values but future changes will be saved.
Note: The above fix may also resolve an issue in which an additional "Firefox Updated" tab opens a page stating, You’ve been updated to the latest version of Firefox, each time you restart Firefox. 
Recovering lost settings
If preference settings have been lost due to a corrupt or damaged prefs.js file, you may be able to recover the missing settings, including Mozilla Suite/SeaMonkey or Thunderbird mail account settings, if the profile folder contains a "prefs-1.js" file that includes the missing settings. If this file exists, exit your Mozilla application (if open), remove (or rename) your existing prefs.js file and then rename "prefs-1.js" to "prefs.js". . For additional information on recovering lost mail account settings, see Recovering a profile that suddenly disappeared - Corrupt or empty prefs.js.
Other software prevents preference changes
- Dell Network Assistant can lock or "protect" the preferences file. If you have this program, try disabling or uninstalling it. 
- McAfee Privacy Service can disable your Mozilla browser's popup blocker. If you use McAfee, you will need to select the option to block popup ads within the McAfee Security Center settings. See this article for details.
- Norton 360 includes a "Firefox Privacy Cleanup" feature that, if enabled, overrides your Firefox Privacy settings and prevents you from keeping your Browsing History, Cookies or other private data between sessions. If you use Norton 360, deselect the "Firefox Privacy Cleanup" option in your Norton 360 settings. 
- Various other computer "cleanup" programs can override your Mozilla browser's Privacy settings and remove private data. 
User.js file locks certain preferences
If you are able to change some preference settings but not others, look for a user.js file in your profile folder (Windows users, read this for help finding it). The user.js file does not exist by default; it is created by users and, in a few cases, by some software programs, so that certain settings get written back to the prefs.js file each time you restart your Mozilla application If you find a user.js file, either remove it from the profile folder or edit the file to remove any unwanted settings. See Resetting preferences for more information.
- Some preferences might be synced, so if you use Sync in Firefox and sync the Preferences then check if there is a corresponding services.sync.prefs.sync.* pref that is set to true that could cause prefs to get changed by other connected devices .
See about:config for more information about preferences.
You can disconnect Sync temporarily to prevent syncing preferences to check if that helps.
- Your Mozilla application may have been customized to use a "mozilla.cfg" file in the installation directory to initialize or lock certain preferences. Note that the content of this file can be obfuscated (see Locking preferences). This also involves another file that specifies to use the mozilla.cfg file (probably in the \defaults\pref folder), so it's best to remove the installation directory and reinstall your Mozilla application (e.g., perform a clean reinstall of Firefox by first removing the "Mozilla Firefox" program folder). If you don't know how the customized settings were added, you may also wish to check for malware.  
- Problematic extensions can change certain preferences settings, causing your changes not to be saved . To see if an extension is causing the problem, disable it (or uninstall unneeded extensions) and then make your preference changes. (Note that preference changes made by some extensions will persist even after the extension is uninstalled or disabled, until you change the settings.)
- The Standard diagnostic provides a basic troubleshooting guide if the preceding suggestions do not fix the problem.