ghacks Technology News

Doing Some Firefox Configuration Spring Cleaning

The Firefox configuration file contains entries for core Firefox settings and extensions. Most users know that it is possible to change the settings by typing in about:config in the Firefox address bar. While the entries can be edited there they can not be deleted.

The file tends to grow over time, largely because entries from uninstalled extensions do not get deleted during uninstallation. Users who install and uninstall add-ons regularly might have a configuration file that is multiple times larger than the standard file.

That’s usually not a problem, a large file might prolong the startup of the web browser by a bit though. Privacy is another issue as some extensions record visits pages or specific rules for websites in the preferences.

The preferences are stored in the prefs.js file in the Firefox user profile directory. Use this guide if you do not know where it is located on your computer system.

It is recommended to create a backup before making any changes to the file to be able to restore it. Firefox needs to be closed before editing the prefs.js file as Firefox automatically saves the prefs.js file on close.

firefox configuration

firefox configuration

Each parameter is stored in a separate line. Many extensions use user_pref(“extensions. in the beginning which makes identification easy, some however start directly with their own name.

The only viable option is to go through the configuration file and locate the extensions that are not installed anymore. That’s a tedious process but the only option at hand as there is no automation of the process available. A rule of thumb is to leave entries alone if they cannot be linked directly to extensions that have been uninstalled.

The size of the prefs.js file on the test system was 167 Kilobytes before spring cleaning. The first cleanup brought the file size down to 88 Kilobytes with room for more after some research.

Here are a few tips:

  • It helps to have the names of the installed extensions and, if applicable, userscripts at hand.
  • Parameters beginning with browser., dom., print. and .network refer to core browser preferences.
  • If you are not sure about a specific setting do the following: Create a backup first, make the changes then and test Firefox to see if the functionality is still there. If you encounter errors restore the backup.

And this is how you delete about:config entries in Firefox.

It is really strange that no one ever build a Firefox preference cleaner that automatically removes old entries from the Firefox configuration file or that the developers have build that feature into the browser. How big is your file? Let us know in the comments.

Enjoyed the article?: Then sign-up for our free newsletter or RSS feed to kick off your day with the latest technology news and tips, or share the article with your friends and contacts on Facebook or Twitter.

Related Articles:

Advanced Firefox Configuration Tips
Firefox Profile Preferences Cleaner
Firefox Configuration Mania
Firefox Extension Preferences Import and Export
Delete Old Extension Preferences In Firefox



About the Author:Martin Brinkmann is a journalist from Germany who founded Ghacks Technology News Back in 2005. He is passionate about all things tech and knows the Internet and computers like the back of his hand. You can follow Martin on Facebook or Twitter.

Author: , Friday June 25, 2010 -
Tags:, , , ,


Responses so far:

  1. Transcontinental says:

    Indeed. I’ve noticed that quite often that when extensions are removed, are removed as well their prefs.js settings when these have not been modified (default). I agree garbage is a pain, and best is to clean prefs.js as soon as an extension is removed (obvious), which still then remains harassing when the values are not namely related to the extension … At this time, our prefs.js is 71,795 bytes for 78 extensions, result of per extension removal cleanup: worth it.

  2. unekdoud says:

    I look up most of my about:config settings in http://kb.mozillazine.org/Firefox_:_FAQs_:_About:config_Entries
    While the list is not comprehensive, it feels safer to check first before removing any preferences.
    On the other hand, if there are any preferences linked to uninstalled extensions I usually don’t hesitate to remove them.

  3. Digitx says:

    23 add-ons, size of Pref.js is 21.6kb.

  4. BGM says:

    Hello! Mine is 69.9kb I run Firefox portable on a USB key with a bunch of dev plugins. I hav 32 active addons and 17 disabled addons.

  5. lol says:

    lol, my prefs.js up to 7 MB
    dunno why…

    • lol says:

      ah, i notice it left over grease monkeys scripts and invalid extension too…
      btw,
      since i am rarely tweaking firefox config, is it safe that i am just delete it,
      let firefox makes a new one..

  6. roban says:

    great article in the autumn :) but the link to the prefs cleaner is tough too (and the thing i looked for)!

    my prefs has a size of 3700 KB! but i am using firefox with same profile since the beginnings :)

  7. geeknik says:

    There is no proof that cleaning up this file has any impact on the performance of Firefox. =)

  8. Miha says:

    Great article, will try your method.

    My prefs.js is 376kb and I keep upgrading my profile since Netscape 3.0 Gold, so I decided to clean it up after 10+ years :)

Leave a Reply   Follow Ghacks   Subscribe To Comment Rss

Subscribe without commenting

© 2005-2012 Ghacks.net. All Rights Reserved. Privacy Policy - About Us