Resetting preferences

跳转至: 导航搜索

Firefox and other Mozilla applications include preference settings that you can change in different ways, such as in the Options/Preferences dialogs, by editing configuration via about:config or, if you are an advanced user, with a user.js file. Preferences can also be added or modified by extensions (add-ons) you've installed.

Sometimes changing preference settings can have unexpected or undesired results. This article explains how you can reset preferences to the default values. It was written for Firefox but may also apply to other Mozilla applications. If you want to restore the default download actions for opening or saving files, see this article. For help resetting Firefox toolbars and controls, see this article.

Resetting preferences in about:config

You can view a list of preferences in about:config. When you change a preference setting or add a new preference, the associated about:config entry will appear in bold type with a user set status. To restore a preference setting to the default value or to remove an added preference, context-click (right-click) on the preference and select Reset.

Resetting all preferences to program defaults

If you simply want to start over with the default set of Firefox preferences, you can use one of these methods:

Remove the preferences file

You can reset user preferences to the default values by manually removing the preferences file from the profile folder, as follows. (This will not affect any data stored in other files, such as toolbar data stored in the "localstore.rdf" file or any file-opening associations stored in the "mimeTypes.rdf" file.)

Important: Although this will also work in Mozilla Suite/SeaMonkey and Thunderbird, it is not recommended because all mail account settings and access to saved mail and passwords will be lost.

  1. Exit Firefox completely
  2. Open the Firefox profile folder. Caution: There is also a folder named "profile" in the Firefox installation directory that contains program defaults, which some users mistake for the Firefox profile folder that stores user data. Windows users should read this to find the profile folder that contains your user data and preference settings.
  3. Delete (or move to backup) the prefs.js file. (If you find multiple numbered prefs.js files or a read-only "prefs.js.moztmp" file, delete those files as well and see this article).
  4. Delete the user.js file, if found, or move it to a backup location (this file does not exist by default).

When you next reopen Firefox, it will rebuild the prefs.js file from program defaults. This will restore the default values of preferences displayed in about:config and restores the default theme.

Firefox Safe Mode


Another way that you can reset your user preferences to the default values is by using "Firefox Safe Mode". This will rebuild the prefs.js file from program defaults, the same as if you manually deleted the file. It will not reset any preferences stored in the user.js file, if one exists.

  1. Exit Firefox completely
  2. Start Firefox in Safe Mode. The "Firefox Safe Mode" window will appear with some troubleshooting options, as shown in this Firefox 2 screen shot.
  3. Select the option, Reset all user preferences to Firefox defaults.
  4. Click the button, Make Changes and Restart.

Resetting certain preferences when a user.js file exists

If you are having problems changing certain settings but you don't want to reset all preferences to the default values, look for a user.js file in your profile folder (Windows users, read this). The user.js file does not exist by default; it is created by users or in a few cases, by other software, 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, open it in a text editor such as Notepad and remove any unwanted entries, or simply remove the user.js file from the profile folder. This will allow you to reset the associated options or preference settings, either through the Options or Preferences dialogs, or in about:config.

Software that changes preference settings


Extensions (add-ons) can change preference settings; for example:

  • DownThemAll 1.0 modifies network.http preference settings after you use it to download a file. [3]
  • MegaUpload Toolbar and the Microsoft .NET Framework Assistant modify the user agent (used by websites to identify your browser) by adding an extra general.useragent preference setting. [4] [5]
  • Toolbar add-ons that include an Internet search feature, such as the Toolbar or the AVG (Yahoo) Security Toolbar change the default search provider by modifying the Keyword.URL preference setting. [6] [7]
  • The Google Toolbar for Firefox has a "Send with Gmail" option that sets network.protocol-handler.external.mailto to false and overrides the default mail client. If the extension is uninstalled with that option set, mailto links in Firefox may stop working (to resolve, reset the preference to the default true value). [8] [9]

These preference changes may have undesired consequences which remain in effect, even after disabling or uninstalling the extension. In such cases, you will need to reset the affected preferences via about:config after the extension is disabled or uninstalled. See Problematic extensions for more information.

See also