Rails Day badge

HowTo: Decrease Page Load Times

Posted by Mike Skinner July 2, 2007

Whilst working on the weekend, I found that the number of simultaneous requests I could make to a web server was limited by my web browser – severely.

I have one Linux server, performing port forwarding for our overseas offices (mostly so they can use Remote Desktop).

I had developed a PHP page to display whether a connection could be opened on each of the forwarded ports. A connection attempt would be tried against each port sequentially, however this caused the page to load very slowly – especially since some requests were making a round trip from the UK to Australia.

On the weekend I upgraded the page to use a very small AJAX library I wrote. Although the page loaded quickly, the statuses returned from each AJAX request were slow.

Although the browser settings I ended up tweaking will not make the aforementioned page load faster (unless all users make these changes), it does make web pages load faster in general.

Firefox
  • Enter into the address bar:
    about:config
  • Then filter on the string:
    connections
  • Change the value of network.http.max-connections to 64
  • Change the value of network.http.max-connections-per-server to 32
  • Change the value of network.http.max-persistent-connections-per-server to 8
Microsoft Internet Explorer
  • Create a new text file and save it with a .reg extension.
  • Paste into this file the following text:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
“MaxConnectionsPerServer”=dword:00000010
“MaxConnectionsPer1_0Server”=dword:0000010
  • Save the reg file.
  • Double click on it to import the updated settings.

Please note that a logoff or reboot may be required after altering the registry. If you are unsure about modifying your registry, please Google these settings first as I will not be held liable for any adverse consequences for these instructions.

In retrospect, I remember using a Firefox extension called Fasterfox in the past, however I would rather keep my extension list short.

Long ago, Mosaic and Netscape allowed users to configure the maximum number of connections. Here is a screenshot I took for you old timers ;-)

Click to zoom in

3 comments

Older posts: 1 2 3 ... 50