Doing Some Firefox Configuration Spring Cleaning - gHacks Tech News

Doing Some Firefox Configuration Spring Cleaning

The Firefox configuration file contains entries for core Firefox settings and extension settings. Most users know that it is possible to modify or add settings by typing 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 removal. Users who install and uninstall add-ons regularly may 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. You can locate it easily by loading about:support in Firefox's address bar. There you find an option to open the profile folder near the top of the page.

It is recommended to create a backup before making any changes to the file so that you can restore it if the need arises. Firefox needs to be closed before editing the prefs.js file as it is automatically saved when it is closed.

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.

Summary
Doing Some Firefox Configuration Spring Cleaning
Article Name
Doing Some Firefox Configuration Spring Cleaning
Description
The guide walks you through the steps of deleting old preferences in the Firefox browser that are not required anymore.
Author
Advertisement

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:


Previous Post: «
Next Post: »

Comments

  1. Transcontinental said on June 25, 2010 at 6:57 pm
    Reply

    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 said on June 25, 2010 at 8:23 pm
    Reply

    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.

    1. IndoMK said on June 26, 2010 at 3:10 am
      Reply

      34 addons, pref.js is 67kb… I’m not going to bother to do cleanup.

  3. Digitx said on June 26, 2010 at 8:06 am
    Reply

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

  4. BGM said on June 26, 2010 at 5:46 pm
    Reply

    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 said on June 27, 2010 at 4:26 am
    Reply

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

    1. lol said on June 27, 2010 at 5:05 am
      Reply

      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..

      1. Martin said on June 27, 2010 at 8:53 am
        Reply

        Deleting is not an option as you might delete settings of installed extensions.

  6. roban said on November 8, 2010 at 2:26 pm
    Reply

    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 said on November 21, 2010 at 10:39 pm
    Reply

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

  8. Miha said on March 6, 2011 at 1:22 pm
    Reply

    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

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.