Wednesday, January 17, 2007

Tweaking your Firefox

Firefox You get to work early and, start your day by checking your e-mail, reading some news and writing some posts on your blog.

Most of the above mentioned activities are done on your web browser. An essential tool nowadays. However, your day is just starting. You're eager to write a new post on your blog, but the browser is taking an eternity to load your blog web page. And, your gmail page is still "Loading...".

How many of us haven't faced this situation so often? Probably, too many.

However, with a few tweaks you can improve the performance of your firefox and, load page faster than usual. Here are some tips and tricks to get you started.

First of all, you should back up the entiry firefox profile directory. Under Linux it is located in your home directory, something like that:

~/.mozilla/firefox/[some_numbers_and_letter].default

Back up the whole directory as follows:

cd ~/.mozilla/firefox

tar -cjvf firefox-prof-bak.tar.bz2 [some_numbers_and_letter].default

Now, you're able to stat tweaking your Browser.

Open your browser, if it is not opened and, follow these steps:

  1. Type about:config in your address bar. This will open Firefox built in configurator;
  2. In the filter bar type http. This filter the options and only displays http flags;
  3. Change: network.http.pipelining to true by double clicking;
  4. Change: network.http.pipelining.maxrequests to 8 by double clicking then entering the new value in the box;
  5. Change: network.http.proxy.pipelining to true by double clicking
  6. Change: network.http.max-persistant-connections-per-proxy to 8
  7. Change: network.http.max-persistant-connections-per-server to 8
  8. Change: network.http.max-connections to 48
  9. Right-Click anywhere in the configurator and add a new integer. The name of this must be nglayout.initialpaint.delay and a value of 0
  10. Restart Firefox by closing all windows and tabs and then reopening Firefox for the changes to become effective.

Now, your browser should load pages faster than before. In fact, what it is doing is open many connections to the server and dowloading contents in parallel instead of opening just one connection per server and downloading the entire content within one connection.

The meaning of the parameters you have just changed are:

network.http.pipelining [Boolean] (True) - If set to True, this setting uses the new HTTP Pipelining feature supported by some servers and proxies. This can improve browsing speeds, however because the feature is not supported by all servers you may experience problems. I recommend setting this to True and only disabling it if you experience such problems as refused connections or unusual behavior.

network.http.pipelining.maxrequests [Integer] (8) - This setting determines the maximum number of requests to send when using the HTTP Pipelining feature (see above). The default is 4, and the maximum possible is 8 (higher values are ignored). I recommend setting this to 8 and only reducing it back to 4 if you experience any problems with the Pipelining feature.

network.http.proxy.pipelining [Boolean] (True) - If set to True, this setting enables the HTTP Pipelining feature (see network.http.pipelining above) for proxy servers. This can improve browsing speeds, however because the feature is not supported by all proxies you may experience problems. I recommend setting this to True and only disabling it if you experience such problems as refused connections or unusual behavior.

network.http.max-persistent-connections-per-proxy [Integer] (8) - If you are connected to a proxy, this setting determines how many connections to keep alive at any time. The default is 4, however you can attempt a higher value such as 8 to improve browser speed. As mentioned in the settings above, raising this to a very high value will put additional stress on the proxy server and may ultimately result in slower browsing for everyone on the proxy and/or a refused connection.

network.http.max-persistent-connections-per-server [Integer] (8) - If you are not connected to a proxy, this setting determines how many connections to a single server to keep alive at any time. The default is 2, however you can attempt a higher value such as 8 to improve browser speed. As mentioned in the settings above, raising this to a very high value will put stress on the particular website server you are connected to and will either result in a refused connection, or slower response times from the web page for every person trying to connect to it. Do not raise this value to one which is very high as it is inconsiderate and counter-productive if everyone does so.rong.

network.http.max-connections [Integer] (48) - This setting determines how many simultaneous HTTP connections can be made by Firefox. The default is already 24, however for most people on moderate to fast Internet connections you can try raising this to a value like 48 or even 96 to allow for more open connections, thereby speeding up browsing multiple pages. The maximum is 65535, but remember that by raising this setting you are only raising the maximum possible number of connections. You aren't forcing Firefox to increase the actual number of connections it makes every time; if your system actually attempted to force 300 connections to open at once for example it would likely slow down to a crawl.

nglayout.initialpaint.delay [Integer] (0) - This setting determines how many milliseconds Firefox should way before it starts to display the page contents. This brief delay allows Firefox to load and arrange the various page components as correctly as possible. The default is 250 milliseconds which isn't very long, however I recommend you set this to 0 to provide the earliest possible viewing of web content and improve the responsive feel of Firefox.

If your the hacker style, here are some links that will help go deeper in your tweaking:

http://www.tweakguides.com/Firefox_9.html

http://www.tweakfirefox.com/tweaks.php

http://kb.mozillazine.org/About:config_entries#Extensions..2A

http://firefox.stealthsettings.com/advanced-tweaking-firefox-20.html

Happy browsing,

Itzhak

No comments: