Ten Mysteries of about:config

Move along, nothing to see here. Some Firefox preferences are just too technical for end users. Oh, you're a Linux Journal reader? Come on in.

The Firefox Web browser, built by the Mozilla Foundation and friends is a complicated piece of technology—if you care to look under the hood. It's not obvious where the hood catch is, because the surface of Firefox (its user interface) is polished up to appeal to ordinary, nontechnical end users. This article gives you a glimpse of the engine. It explains how the Mozilla about:config URL opens up a world of obscure preferences that can be used to tweak the default setup. They're an improbable collection and therein lies the beauty of Firefox if you're a grease monkey or otherwise technical. At the end you'll know a little more about Firefox, but only enough to be dangerous.

Like any Linux-friendly piece of software, Firefox responds to preset environment variables. You can, for example, set the MOZILLA_FIVE_HOME or MOZ_PLUGIN_PATH variables prior to startup. They both work like the standard PATH, so no surprises there. The per-process space available for environment variables is, however, limited, and a simple textual concatenation of attribute-value pairs is a fairly inflexible way to store data. Firefox has a large set of runtime configuration options, and the environment isn't a suitable storage area.

Firefox configuration is stored in a small attribute-type-value database called the preference system. You can see a delta of this data set in the ~/.mozilla/firefox/*/prefs.js file. That file holds only the nondefault values selected by the user. The rest of the preferences either are unstated or stated in install files that are part of the standard install. For me, they're in /local/install/firefox/defaults/pref, because /local is my playpen of choice.

For a technical person, this system is a bit problematic because the full list of preferences doesn't appear anywhere on disk, and the standard way to change those preferences is to use the Firefox User Interface, which also is incomplete. That interface provides GUI elements (buttons, fields and check boxes) for only the most basic of the preferences available. Firefox isn't trying to be Emacs, after all. The rest of the preferences have to be dug up from elsewhere.

That other place is the special string about:config, which can be typed in the Firefox Location bar where the addresses of Web sites are entered. Briefly recall the taxonomy of W3C addresses: URIs (Universal Resource Identifiers) are a special case of IRIs (International Resource Identifiers). A URI either can be a URL (a Uniform Resource Locator) or a URN ( a Uniform Resource Name). It's URLs that we see all the time. They consist of a scheme (typically http), a colon (:) and an address (x.org).

You can define your own scheme. Mozilla does that for “about”, which is used to access internal browser resources. Try about:cache, for example. The config resource is a hook into the preference system. When you type about:config, you're navigating to a local resource just as you would navigate to a Web-based resource for an HTTP-based Web page. Figure 1 shows the results of loading the about:config resource.

Figure 1. Firefox Showing the about:config Preferences

This preference listing is also a form. Right-click on any preference to modify it or to state a new preference. Shorten the display by entering some text in the Filter box if you want. Many Firefox extensions can provide alternate interfaces to about:config. Feel free to experiment with them.

Nothing is perfect, alas; about:config shows only preferences that already have been set or specified anywhere. It doesn't show preferences that have meaningful uses, which appear nowhere in the about:config list. To add a value for a new preference that doesn't appear, simply right-click anywhere in the main window, and select New from the context menu, then select the type of preference: string, integer or Boolean.

Without further ado, here's a tour of preferences to which the Firefox UI doesn't give you access. Some are unmasked by about:config; some are not. They're all relatively safe to experiment with. If you get into trouble, go back to about:config and unset the preference, or, in the worst case, shut down Firefox and delete the prefs.js file noted earlier. Everything said to this point also applies to other Mozilla products: the Mozilla Application Suite, Thunderbird and so on. Hesitate before deleting the Thunderbird prefs.js file. It contains important pointers to your e-mail.

Tune the Use of Firefox Caches

Here's a simple preference to begin with. You can explicitly set the size of the memory part of Firefox's Web cache. Here's the preference, which has a type of integer:

browser.cache.memory.capacity

Set it to the integral number of KB (Kilobytes) that you want as a maximum. By default, this preference is unstated and has a default value of -1, meaning “expand to fill available memory as required”. That's a little like the Linux disk buffer cache. You might not want that if you're running OpenOffice.org and Firefox simultaneously and working both applications hard. If you do change this preference, you're going the way of Mac OS 9 and lower, where each application gets an explicit memory allocation. That could be a tuning burden if you go too far with it.

The Mozilla Web cache (both memory and disk) is akin to the function of servers like Squid. That is, both types of cache are smart about the use of HTTP headers for caching purposes. If you're in control of the local Web proxy, there's probably more value in a huge Squid cache than there is in a really big local disk cache. A bigger Firefox cache still gives some performance boost though. You can alter caching use through the integer preference:

browser.cache.check_doc_frequency

This preference affects when Firefox accesses the cache, not how the cache itself works. The cache caches Web content every opportunity it gets, but if Firefox fails to check it, such opportunities will come rarely. Set the preference to 0 for one check per URL resource per Firefox Web surfing session, 1 always to use the cache, 2 never to use the cache and 3 (the default) when the HTTP caching rules says it's a good idea to cache.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

browser.link.open_newwindow.restriction

Anonymous's picture

How should that be set?

There are not a few sites that seem to find their way past my "Open links in new tabs" or even (as well as) the GreaseMonkey script "killblank", the latter of which in my opinion needs some upgrading not to mention beefing up.

But back to the idea of an about:config/user.js tweak. I see this third setting in the former, and its entry details read "default" for Status, "integer" for Type, and "0" for Value.

Is there another value that will better ensure all links clicked on open 'uniformly' in new tabs or windows? Or do I expect too much -- as I often do -- from the codemeisters of Mozilla.org?

BZT

Not expecting too much this

Anonymous's picture

Not expecting too much this time.

http://kb.mozillazine.org/Browser.link.open_newwindow.restriction

Set it to 3 and it obeys browser.link.open_newwindow, whatever you may have it set for.

Mozilla Knowledge Base:

This includes:
* All links with target="_blank".
* JavaScript calls to window.open() without the "features" parameter (3rd parameter).
This does not include:
* JavaScript calls to window.open() with the "features" parameter (3rd parameter).

BZT

adding new variables

olegtaras's picture

I wanted to add there general.useragent.override;Opera/9.25 (Windows NT 6.0; U; en)

Is there any way to save it for future sessions?

Great article

Anonymous's picture

I have used konqueror in the past and the nice thing it would do with the e-mail link button is it would put the title of the page in the subject line and a link in the e-mail already, I am trying to get mozilla to pull up k-mail and do the same, but I can only convince it to pull up a completly blank compose e-mail screen. I am using

network.protocol-handler.app.mailto
with a value of

/usr/bin/kmail

anyone have any Ideas?

about:config

andrey's picture

rare article as far as i can tell . its hard for newbie like me to find much info about:) about:config . but my question is do they apply to seamonkey as well. thank you very much for taking your time to reply sincerly andrey

about: - Plugins

Rentner B.'s picture

Nigel, yes you are right about this features - but I really prefer a right-click-interface, that my extension gives me to change all the important switches in my Firefox 8-)

re:about: - Plugins

Jack Syskowski's picture

Don*t leave us in the dark - what plugin are you talking about ???

re:about: - Plugins

Rentner B.'s picture

Oh, sorry - I use the WebDeveloper-Plugin from http://chrispederick.com/work/webdeveloper/ - excellent tool.

Nice Idea

Wahyu's picture

This is nice idea to tune Firefox coz standard delivery of Firefox is slower.

Fasterfox

Steve-O's picture

Check out the Fasterfox extension: Fasterfox - Performance and network tweaks for firefox

It is similar to the Network Tweak extension but with a several additional options.

Re: Fasterfox

Segundamano's picture

Hi,

I didn't know about this utility but I tried it and it's going very quickly my firefox browser.

It has a link prefetch that download pages before you click it. It has also a lot of options to tweak and additionaly a popup blocker.

Thanks for the link,
Segundamano.

extensions

Anonymous's picture

the tweak network settings extension is the most fantabulous extension ever made. you can increase the max active connections and turn on pipelining.

Though the extension automate

Anonymous's picture

Though the extension automates the process, I'd rather use the guide at http://www.tweakfactor.com/articles/tweaks/firefoxtweak/4.html and do it manually. Besides, you only use the extension once and then it just sits there doing nothing.

Over-Optimizing ...

George-F.'s picture

All this tweaks are very, very techie - but to be honest, except of the User-Agent-Changer, I didnt really needed them. By default, Firefox is configured very well.

Typo in pref name

Gerv's picture

The pref is called signed.applets.codebase_principal_support (note the spelling of "principal").

See http://www.mozilla.org/projects/security/components/signed-scripts.html for confirmation.

A principal is the first, highest or most important thing.
A principle is a basic truth, law or assumption.

Don't forget about extensions

M ODonnell's picture

Don't forget that there's a treasure-trove of cool hacks and such to be found by following Tools->Extensions and then "Get More Extensions" at the bottom of that newly opened window. Many of the shortcomings mentioned here are handled very nicely by the various extensions. For example: check out the Advanced Preferences Editor...

--MO'D

Open a target="_blank" href in a new tab

Morten Sickel's picture

I am switching between firefox, opera and konqueror. One thing that really annoys me with firefox is that when I am opening an href with target="_blank", then it comes in a new window rather than a tab in the existing window. I would guess that there are some settings in about:config that can alter this, but it's not easy to find. Anybody who would like to share som knowledge on this?

Morten

(Yes, I know I can use button-2 to open it in a new tab, but that opens all links in new tabs, I would like to have the same behaviour as the standard in opera and konqueror)

href in new tab

Anonymous's picture

So use opera or konquror
picky, picky, picky

Jack

Where is the 'force links that open new windows...'

Morten Sickel's picture

Commenting on my own post, well...

Through a closer look through the firefox help file, I found the option 'Force links that open new windows to open in' option. But I cannot see it in my options window... any clue?

Me again..

It's hidden

Steven's picture

Go to about:config and change the value browser.tabs.showSingleWindowModePrefs to true. The option will now appear in your preferences dialog (with the other tabbed browsing options).

You should really take a look

Jedai's picture

You should really take a look at the extensions : Tabbrowser Preferences do what you ask easily, and much more ! :D

--
Jedaï

These two lines can be added

Anonymous's picture

These two lines can be added to user.js. More target disabling optionts will be available.

// Force external links to open in new tab instead of window
user_pref("browser.link.open_external", 3);

// Force links to open in tab instead of windows
user_pref("browser.link.open_newwindow", 3);

Thanks!

Morten Sickel's picture

Now I am a even more happy firefox user!

M.

The real mystery

Anonymous's picture

The real is mystery is still:

Why does mozila-firefox connects to google (and even shows
me a cookie dialog for cookies from google), before showing
the about:config site when I enter about:config in the address
bar?

network.prefetch-next [Boolean]

Windows User's picture

http://www.mozilla.org/projects/netlib/Link_Prefetching_FAQ.html

read this.

network.prefetch-next [Boolean] (False) - This setting determines whether to use a new Firefox feature called Link Prefetching. See the Neat Stuff & Conclusion section for a practical example, and why you should set this preference to False.
[from http://www.tweakguides.com/Firefox_9.html ]

Re: The real mystery

Anonymous's picture

It doesn't do that here. Must be some extension you have installed.

mozilla

Anonymous's picture

If like me you still have phone line access with a time limit and you prefer to save this and read it off line, you now have to disable javascript in Mozilla to do so.

I have no web access on one c

fci's picture

I have no web access on one computer so when I am trying to view certain HTML files it has issues(ones that I did Save As "Web Page, complete" with from firefox). so it's not just the dialup people.

You really should get DSL. T

Anonymous's picture

You really should get DSL. Trust me, once you get it you will never know how you lived without it.

You should really catch a clue

Anonymous's picture

You should really catch a clue. Trust me, once you catch a clue you will never know how you lived without it.

Believe it or not huge portions of the country don't have DSL available. Some people can't get DSL or cable.

how provincial

Anonymous's picture

To say nothing of the world...

"Believe it or not huge porti

Anonymous's picture

"Believe it or not huge portions of the country don't have DSL available. Some people can't get DSL or cable."

Yeah, but those people/areas suck and no one cares about them

phone line/dsl

Anonymous's picture

Your comment, "Yeah, but those people/areas suck and no one cares about them" was very good.....FOR ME TO POOP ON!

DUMBA$$

They do suck, and voted for B

Anonymous's picture

They do suck, and voted for Bush

Get over it already. Or move

Anonymous's picture

Get over it already. Or move to France with Johnny Depp or Canada. We don't want you. The Best Man Won. Another bajillion recounts won't make a difference. Get a life, and get out of mine.

FWIW, I'm on a cablemodem in a tiny little 'red county' town in North Carolina. And I still think bandwidth should not be wasted by fluff.

What a bunch of nationalist b

Anonymous's picture

What a bunch of nationalist bullshit.

it's funny and true

Anonymous's picture

it's funny and true

Thax this was really useful b

Mike's picture

Thax this was really useful but for the invisible settings you can click add and it deals with it (adding Tbird I've been trying to get it to work for a while).

Amazing how quickly it goes stuff get political oh well

4 more years!!

Madonna is also another commi

Bill C.'s picture

Madonna is also another commie loving pig! all you anti-bush
morons can shove it!

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix