Monday, April 2, 2007

Top Firefox 2 config tweaks

You're a power surfer and you want your web browser your way. How to modify Firefox's configuration (about:config)

All this "advanced config" talk got you worried? Fear not, my friend. Here's the deal: Firefox's configuration is a long list of keysand values. To view this list, type about:config into the Firefox address bar. Then, enter the name of the key you want to update in the "Filter" field. The list will narrow to only the entries that match your keyword as you type, as shown.

fxaboutcfg.png

(The key, of course, is knowing the key. More on that below.) To modify the value of a key, double-click on the value field and update the entry. To see your changes, restart your browser. Easy as pie. Got it? Good. Let's get to tweaking.

Session restore

Fx 2.0 only: As a blogger and web mail user, it breaks my heart to recount how many times I've composed a long post or email message, then accidentally closed the tab or browser and lost all my work. No more! With Firefox 2, set the browser.startup.page key to 3 to restore your browsing session - with form entries intact! - every time you start your browser or undo close tab after a wayward click.

Note: By default, Firefox 2 automatically restores your session if your browser crashes - but this does it every time you restart your browser normally. Thanks for the tip, Arun!

Update: Ryan points out that doing it this way is like swatting a fly with a sledgehammer. To do it the normal person way, from the Tools menu choose Options, and in the Main area, select "Show my windows and tabs from last time" from the "When Firefox starts" dropdown. D'oh! Thanks Ryan!

Tab width before scrolling kicks in

Fx 2.0 only: The biggest interface changes in Firefox 2 involve tabbed browsing. Power surfers who open more than a dozen tabs will notice that Firefox 2 minimizes tabs to a certain width, then sets the excess to scroll off the tab bar with left and right arrows. As someone who often has more than a dozen tabs open, not being able to see them all made me crazy. One solution is to reduce the minimum tab width so that more tabs fit in the bar before the scroll kicks in. The default is 100 pixels; I found that 75 worked better for me - page titles were still readable, but more tabs could fit. Compare 100 width, which fits 7 tabs across at this size (click to enlarge): http://www.lifehacker.com/assets/resources/2006/10/fxtabs100-thumb.png

To 75, which fits 10 across at this size (click to enlarge):

http://www.lifehacker.com/assets/resources/2006/10/fx-t75-thumb.png

To disable tab scrolling entirely, set the value to 0.

  • Key: browser.tabs.tabMinWidth
  • Modified Value: 75 (fit in more tabs before overflow enables scroll)
  • Alternate Modified Value: 0 (disable scroll entirely)
  • Default: 100

Tab close buttons

Fx 2.0 only: Another tab interface change in Firefox 2 is the addition of a close button on each individual tab. I happen to love this, but some hate it, saying it causes them to accidentally close a tab when just trying to switch to it. If you're a hater, revert to the Firefox 1.5 behavior by changing the browser.tabs.closeButtons value to 3. This will not display close tabs on individual tabs, and turn on a single close tab button at the right end of the tab bar.

  • Key: browser.tabs.closeButtons
  • Modified Value: 3 (revert to Firefox 1.5 behavior)
  • Alternate Modified Value: 2 (don't display any close tab buttons)
  • Default: 1 (display close buttons on all tabs)

Fetch only what you click

Fx .6 and up: Firefox has this wacky little feature that downloads pages from links it thinks you may click on pages you view, like the top result on a page of Google results. This means you use up bandwidth and CPU cycles and store history for web pages you may not have ever viewed. Creepy, eh? To stop that madness, set the network.prefetch-next key to false.

Limit RAM usage

All versions: Goodness knows I've done a good amount of belly-aching about Firefox's voracious appetite for RAM. (It's consistently the most memory-intensive process on both my PC and Mac.) Happily a simple config tweak got Mem Use right back down to a more comfortable number. Along with the previous prefetch mod, set your browser.cache.disk.capacity browser.cache.memory.capacity to a value that fits your total RAM.

  • Key: browser.cache.memory.capacity
  • Modified Value: Depends on your system's total memory. According to Computerworld: For RAM sizes between 512BM and 1GB, start with 15000. For RAM sizes between 128MB and 512M, try 5000.

Turn off chrome tooltips

fxtooltipblock.png

All versions: I have an irritating Firefox problem on my Mac. When I try to drag a bookmark into one of my bookmark toolbar folders, the tool tip gets in the way and prevents the drop from working. Argh! Like you, I already know what all the buttons on my browser chrome do, so the tool tips aren't necessary. To turn them off, set the browser.chrome.toolbar_tips key value to false. Bonus is, it solved my Mac's bookmark drag and drop problem.

  • Key: browser.chrome.toolbar_tips
  • Modified Value: false

Lastly, though 2.0's default value is a lot more reasonable than 1.5's, you can use about:config to put off that annoying Unresponsive Script dialog on Javascript-heavy web pages.

Update: From the comments, a few more good about:config tweaks:

  • layout.spellcheckDefault = 2 turns on Firefox 2's spell-checking in input fields as well as textareas. (That means no more typos in Lifehacker post headlines!)
  • browser.urlbar.hideGoButton=true turns off the rarely-used Go button at the end of the address bar, for more room to see long URLs. Thanks, sister-ray!

See the MozillaZine about:config wiki page for the exhaustive list of Firefox preferences keys, their possible values and effects.

What are your favorite Firefox about:config tweaks? Post 'em up in the comments.

Gina Trapani, the editor of Lifehacker, is a sucker for advanced settings. Her semi-weekly feature, Geek to Live, appears every Wednesday and Friday on Lifehacker. Subscribe to the Geek to Live feed to get new installments in your newsreader.

User Comments: 1.

forevergeek.com has a useful guide on speeding up firefox for broadband users. basically after getting to the hidden config settings you set the browser to request more data that it usually does.

1.Type "about:config" into the address bar and hit return. Scroll down and look for the following entries:

network.http.pipelining network.http.proxy.pipelining network.http.pipelining.maxrequests

Normally the browser will make one request to a web page at a time. When you enable pipelining it will make several at once, which really speeds up page loading.

2. Alter the entries as follows:

Set "network.http.pipelining" to "true"

Set "network.http.proxy.pipelining" to "true"

Set "network.http.pipelining.maxrequests" to some number like 30. This means it will make 30 requests at once.

3. Lastly right-click anywhere and select New-> Integer. Name it "nglayout.initialpaint.delay" and set its value to "0". This value is the amount of time the browser waits before it acts on information it receives.

If you're using a broadband connection you'll load pages MUCH faster now!

+

Starting in Firefox 2.0, The option to block third-party cookies has been removed from the user interface [1]. Firefox 2.0 users who wish to limit allowed cookies to those set by the originating website can use about:config to modify the preference network.cookie.cookieBehavior to "1" 2. The session restore tweak isn't necessary because it can already be found in the Options->Main->Homepage drop-down menu. 3.

"Set "network.http.pipelining.maxrequests" to some number like 30. This means it will make 30 requests at once."

I really wish people would stop perpetuating this myth. Firefox caps out at 8 pipelined requests, which is the max allowed by the HTTP spec. By default, it does 4 pipelined requests.

Furthermore, if you could do 30 pipelined requests we'd have sites with a high population of FF users being brought to their knees pretty quickly. Some sites will even block your IP if you try to pull a stunt like that.

4.

layout.spellcheckDefault=2 will enable spellcheck for text inputs, not just textareas. 5. My personal favorite about:config tweak is setting browser.search.openintab to true. No more accidentally overwriting the page I'm on when I'm performing a search to follow up on later.

From