You are on page 1of 6

====== Home ======

Created Monday 16 June 2008


**speed up firefox**
http://www.hackaday.com

Posted Dec 26th 2004 11:50AM by Phillip Torrone


Filed under: misc hacks
forevergeek.com has a useful guide on speeding up firefox for broadband users. b
asically after getting to the hidden config settings you set the browser to requ
est 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.ma
xrequests
Normally the browser will make one request to a web page at a time. When you ena
ble 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.initi
alpaint.delay" and set its value to "0". This value is the amount of time the br
owser waits before it acts on information it receives.
If you're using a broadband connection you'll load pages MUCH faster now!

**Hacking Firefox: The secrets of about:config**


http://www.computerworld.com
Discover more than 20 behind-the-scenes tweaks for speeding up page loads, reduc
ing memory drain and making the interface behave the way you want it to.

May 29, 2007 (Computerworld) -- Ever since its debut, Firefox has garnered a rep
utation for being an enormously customizable program, both through its add-on ar
chitecture and its internal settings. In fact, many of Firefox's settings aren't
exposed through the Tools > Options menu; the only way to change them is to edi
t them manually. In this article, we'll explore some of the most useful Firefox
settings that you can change on your own and that aren't normally available thro
ugh the program's graphical interface.

The closest analogy to how Firefox manages its internal settings is the Windows
Registry. Each setting, or preference, is given a name and stored as a string (t
ext), integer (number) or Boolean (true/false) value. However, Firefox doesn't k
eep its settings in the registry, but in a file called prefs.js. You can edit pr
efs.js directly, but it's often easier to change the settings through the browse
r window.
Type **about:config** in the address bar and press Enter, and you'll see all the
settings currently enumerated in prefs.js, listed in alphabetical order. To nar
row down the hundreds of configuration preferences to just the few you need, typ
e a search term into the Filter: bar. (Click the Show All button or just clear t
he Filter: bar to get the full list back again.)
To edit a preference, double-click on the name and you'll be prompted for the ne
w value. If you double-click on an entry that has a Boolean value, it'll just sw
itch from true to false or vice versa; double-click again to revert to the origi
nal setting. Not all changes take effect immediately, so if you want to be absol
utely certain a given change is in effect, be sure to close and reopen Firefox a
fter making a change.
Note that not every setting in about:config exists by default. Some of them have
to be created manually. If you want to add a new preference, right-click somewh
ere on the page and select New, then select the type of item to create (String,
Integer or Boolean) and supply the name and value.

**Before you begin**


Here are a few caveats to keep in mind as you explore and tweak:
Not everyone will get the same benefits by enabling these tweaks. This is especi
ally true for changing the network settings. If you habitually visit sites that
don't allow a large number of connections per client, for instance, you won't se
e much benefit from raising the number of connections per server.
Some hacks may have a limited shelf life. With each successive release of Firefo
x, the need for tweaking any of the performance-related config settings (like th
e network settings) may dwindle as Firefox becomes more self-tuning based on fee
dback from real-world usage scenarios. In short, what works now may not always w
ork in the future -- and that might not be a bad thing.
Keep a log of everything you change, or make backups. If you tweak something now
and notice bizarre activity in a week, you'll want to be able to track back to
what was altered and undo it. Firefox does show which about:config changes have
been set manually, but this isn't always the most accurate way to find out what
you changed.
To make a backup of your preferences in Firefox, just **make a copy of the file
prefs.js, **which is kept in your Firefox profile folder. If you mess something
up, you can always copy this file back in. (Be sure to shut down Firefox before
making a copy of prefs.js or moving a copy back into the profile folder!)
In Windows XP, the profile folder is
\Documents and Settings\<username>\Application Data\Mozilla\Firefox\Profiles\<pr
ofile ID>.default\
In Windows Vista, this folder is
\Users\<username>\AppData\Roaming\Mozilla\Firefox\Profiles\<profile ID>.default\
Note that Application Data and AppData are hidden folders by default, so they ma
y not show up unless you force Explorer to show hidden objects. (Open the Contro
l Panel, double-click Folder Options, select the View tab, select "Show hidden f
iles and folders" and click OK.)
In Mac OS X, the profile folder is
<username>/Library/Application Support/Firefox/Profiles/<profile ID>.default/
**and in Linux it's**
**~/.mozilla/firefox/<profile ID>.default/**
but on those platforms it's usually quicker simply to search for prefs.js.
Alternatively, you can use the handy Firefox Extension Backup Extension (FEBE).
It backs up not only the prefs.js file but just about every other thing in Firef
ox -- extensions, themes, cookies, form history and so on.
Speed up page display
Some of the more recent Firefox customizations I've examined are ways to speed u
p the rendering of Web pages. The settings to do this are a little arcane and no
t terribly self-explanatory, but with a little tinkering, you can often get page
s to pop up faster and waste less time redrawing themselves.
Start rendering pages faster
Creating an nglayout.initialpaint.delay integer preference lets you control how
long Firefox waits before starting to render a page. If this value isn't set, Fi
refox defaults to 250 milliseconds, or 0.25 of a second. Some people report that
setting it to 0 -- i.e., forcing Firefox to begin rendering immediately -- caus
es almost all pages to show up faster. Values as high as 50 are also pretty snap
py.
Reduce the number of reflows
When Firefox is actively loading a page, it periodically reformats or "reflows"
the page as it loads, based on what data has been received. Create a content.not
ify.interval integer preference to control the minimum number of microseconds (m
illionths of a second) that elapse between reflows. If it's not explicitly set,
it defaults to 120000 (0.12 of a second).
Too many reflows may make the browser feel sluggish, so you can increase the int
erval between reflows by raising this to 500000 (500,000, or 1/2 second) or even
to 1000000 (1 million, or 1 second). If you set this value, be sure to also cre
ate a Boolean value called content.notify.ontimer and set it to true.
Control Firefox's 'unresponsive' time
When rendering a page, Firefox periodically runs a little faster internally to s
peed up the rendering process (a method Mozilla calls "tokenizing"), but at the
expense of being unresponsive to user input for that length of time. If you want
to set the maximum length of time any one of these unresponsive periods can be,
create an integer preference called content.max.tokenizing.time.
Set this to a multiple of content.notify.interval's value, or even the same valu
e (but higher is probably better). If you set this to something lower than conte
nt.notify.interval, the browser may respond more often to user input while pages
are being rendered, but the page itself will render that much more slowly.
If you set a value for content.max.tokenizing.time, you also need to create two
more Boolean values -- content.notify.ontimer and content.interrupt.parsing -- a
nd set them both to true.
Control Firefox's 'highly responsive' time
If Firefox is rendering a page and the user performs some kind of command, like
scrolling through a still-loading page, Firefox will remain more responsive to u
ser input for a period of time. To control how long this interval is, create an
integer preference called content.switch.threshold.
This is normally triple the value of content.notify.interval, but I typically se
t it to be the same as that value. Set it to something very low -- say, 10000 (1
0,000 microseconds) -- and the browser may not respond as snappily, but it may c
ause the rendering to complete more quickly.
If you haven't already created the Boolean values content.notify.ontimer and con
tent.interrupt.parsing and set them both to true in conjunction with content.max
.tokenizing.time, you'll need to do so to make content.switch.threshold work pro
perly.
If you are more inclined to wait for a page to finish loading before attempting
to do anything with it (like scroll through it), you can set content.max.tokeniz
ing.time to a higher value and content.switch.threshold to a lower value to allo
w Firefox to finish rendering a page faster at the expense of processing user co
mmands. On the other hand, if you're the kind of person who likes to scroll thro
ugh a page and start reading it before it's done loading, you can set content.ma
x.tokenizing.time to a lower value and content.switch.threshold to a higher one,
to give you back that much more responsiveness at the cost of page-rendering sp
eed.

PAGE 4

Make the user interface behave


Another big reason people hack Firefox's settings is to modify the user interfac
e -- either to make it a little easier to do something, or to revert to a behavi
or that was prevalent in Version 1.x but changed in 2.0.
Get case-sensitive, in-page searches

The integer preference


**accessibility.typeaheadfind.casesensitive** controls how Firefox's "Find as Yo
u Type" feature behaves. The default is 0 for case-insensitive searches; set it
to 1 for case-sensitive matching.
**Control** **address** **bar** **searches**
You may have noticed that if you type something into Firefox's address bar that'
s not an address (a "keyword"), Firefox typically passes it on to Google as an "
I'm Feeling Lucky" search term. The exact search engine string to use is defined
in the string preference keyword.URL; if you want to change it to something els
e, you can simply edit this string.
For instance, to make Microsoft's Live.com the default keyword search, set this
string to
http://search.live.com/results.aspx?q=
For a Yahoo search, it would be
http://search.yahoo.com/search?p=
If you want to restore the default search, use
http://www.google.com/search?ie=UTF-8&oe=
UTF-8&sourceid=navclient&gfns=1&q=
Finally, if you want to turn this address-bar keyword functionality off altogeth
er, set the Boolean preference keyword.enabled to false.
Note that with Google, the more generic the keyword, the less likely it is to be
used as an "I'm Feeling Lucky" search -- although what constitutes "generic" is
n't always clear. For instance, typing "clean" into the address bar returns a ge
neric Google search page, but "sideways" takes me to the Internet Movie Database
entry for the movie of that name (the "I'm Feeling Lucky" result). Your mileage
will almost certainly vary.
Select just a word
The Boolean preference layout.word_select.eat_space_to_next_word governs one of
Firefox's tiny, but for me incredibly annoying, little behaviors. When you doubl
e-click on a word in a Web page to select it, Firefox automatically includes the
space after the word. Most of the time I don't want that; I just want the selec
tion to stop at the end of the word. Setting this to false will defeat that beha
vior.
Select a word and its punctuation
Somewhat contrarily, if you double-click a word that's next to any kind of punct
uation mark, Firefox defaults to selecting only the word itself, not its adjacen
t punctuation. Set the Boolean preference layout.word_select.stop_at_punctuation
to false to select the word and its adjacent punctuation.
Get Alt-hotkey shortcuts back
One minor change in Firefox 2 was the way in which form elements on a Web page h
ad hotkey bindings assigned to them. In Firefox 1.x, when a Web page assigned a
hotkey to a form element, you pressed Alt-hotkey to access it. In Version 2.x, t
his was changed to Alt-Shift-hotkey. To revert to the original 1.x behavior, set
the integer preference ui.key.contentAccess to 4. This is useful if you have, f
or instance, a Web-based interface you spend a lot of time in, and use Alt-key b
indings to do things quickly in that particular page.
Note that one possible consequence of setting this back to the old behavior is t
hat Alt-key bindings on a Web page can now override the default key sequences fo
r the program itself (such as Alt-S for History), but you can always get around
this by tapping Alt to activate the menu and then tapping the program hotkey in
question.
Change scrollbar behavior
By default, clicking in the empty areas of the Firefox window's scrollbar will s
imply cause the view to move up or down one page. You can change this behavior b
y creating a Boolean preference called ui.scrollToClick and setting its value to
true. Now clicking in a scrollbar will cause the view to jump directly to that
point in the page (basically the same as dragging the scrollbar to that position
).
Get click-and-hold context menus back (for Macs only)
If you want to restore the classic click-and-hold context-menu behavior on the M
acintosh, edit or create the Boolean preference ui.click_hold_context_menus and
set it to true.
PAGE 5

Hack network connections


The very first batch of Firefox hacks I learned about was how to override its ne
twork defaults. Some of Firefox's out-of-the-box settings for how it deals with
network connections are fairly conservative, probably because Firefox has no way
of knowing what kind of network it's using (dial-up vs. broadband, etc.). If yo
u have a network that readily supports multiple simultaneous connections, you ca
n make a number of changes to Firefox to take advantage of that.
But proceed with caution. If Firefox's network settings are set too aggressively
, they can lead you to being blacklisted for a short time by a given remote serv
er. And you should certainly get permission from the IT department before attemp
ting this kind of hack in a corporate environment. Regardless, moderation is the
key. For the most part, I find that setting the network settings to absurdly hi
gh numbers does not accomplish much of anything; it helps to ramp them up a bit,
but generally not much more than that.
Maximize connections to multiple servers
The integer preference
network.http.max-connections controls how many simultaneous network connections
Firefox will make at any one time to any number of Web servers. One typical way
this pays off is if you have Firefox set to load multiple home pages in differen
t tabs at once, or if you access pages that aggregate contents from several diff
erent servers (for instance, multiple advertising systems).
By default, this is set to 24, which should work well for most network connectio
ns, but you can raise it to 32 and see if that has any effect. (I've seen people
raise this as high as 64, but anything above 32 doesn't seem to provide much di
scernible payoff.)
Maximize connections to the same server
The integer preference network.http.max-connections-per-server controls how many
separate connections Firefox makes to the same server, which allows multiple el
ements in a page to be downloaded in parallel. Normally, this is set to 8, but s
ome people choose to set it as high as 16.
Note, however, that some Web servers will block you if you try to establish more
than 8 inbound connections, typically as a bandwidth-protection or antileeching
measure -- this is the kind of behavior also exhibited by download managers tha
t try to use as many "slots" as possible to speed things up, and many server adm
ins hate that sort of thing. Also, if you're on a connection that's not fast to
begin with (e.g., slow ISDN or dial-up), changing this setting will have no disc
ernible effect, and may in fact slow things down.
Bump up persistent connections per server
Firefox keeps persistent connections to a server "alive" to improve performance:
Instead of simply sending the results of one request and then closing, they're
held open so that multiple requests can pass back and forth. This means a little
less network traffic overall, since a connection to a given server has to be se
t up only once, instead of once for each separate piece of content; it also mean
s successive connections to the same server go through faster.
The integer preference network.http.max-persistent-connections-per-server contro
ls the number of persistent connections allowed per server. By default, this is
set to 2, although some servers will honor a higher number of persistent connect
ions (for instance, if there's a lot of content from their site that loads in pa
rallel, like images or the contents of frames). You probably only want to go as
high as 8 with this; more than that may cause a server to temporarily blacklist
your IP address depending on how it's configured. (If you're going through a pro
xy defined by Firefox, use network.http.max-persistent-connections-per-proxy ins
tead of this setting.)

You might also like