DSFS

Hack network connections

The very first batch of Firefox hacks I learned about was how to override its network 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 you have a network that readily supports multiple simultaneous connections, you can 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 server. And you should certainly get permission from the IT department before attempting 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 high 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 different tabs at once, or if you access pages that aggregate contents from several different servers (for instance, multiple advertising systems).
By default, this is set to 24, which should work well for most network connections, 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 discernible 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 elements in a page to be downloaded in parallel. Normally, this is set to 8, but some 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 that try to use as many "slots" as possible to speed things up, and many server admins 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 discernible 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 set up only once, instead of once for each separate piece of content; it also means successive connections to the same server go through faster.
The integer preference network.http.max-persistent-connections-per-server controls 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 connections (for instance, if there's a lot of content from their site that loads in parallel, 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 proxy defined by Firefox, use network.http.max-persistent-connections-per-proxy instead of this setting.)



 
Reduce the interval between persistent connections
If you've already used up all the persistent server connections described in the above setting and Firefox needs to make more connections, the integer setting network.http.request.max-start-delay governs how long to wait before attempting to open new connections. This helps if Firefox's persistent-connection limit has been used up by a number of long downloads, and the browser needs to queue a shorter download on top of that. Most people set this to 0 (in seconds), with the default being 10. Note that this does not override connection limits imposed by remote hosts, so its usefulness is limited by the whim of the server you're connecting to.
Turn on pipelining
The Boolean preference network.http.pipelining enables an experimental acceleration technique called "pipelining," which speeds up the loading of most Web pages. A browser normally waits for some acknowledgment of a given request from a server before attempting to send another one to that server; pipelining sends multiple requests at once without waiting for responses one at a time.
If you turn this on (that is, set its value to true), also be sure to create or edit the integer preference network.http.pipelining.maxrequests, which controls the maximum number of requests that can be pipelined at once. 16 should do it; some people go as high as 128 but there's not much evidence it'll help. (If you use a proxy, set network.http.proxy.pipelining to true as well.)
Note that not every Web server honors pipelining requests correctly, which is why this feature is turned off by default and still considered experimental. Some sites may behave strangely if you submit pipelined requests.

0 comments:

Post a Comment

 
2011 Redoon blog | Blogger Templates for Over 50 Chat | Distributed by Blogger Blog Templates Sponsors: Short People Club, Michigan Mechanical Engineer Jobs, California Dietitian Jobs