Optimizing Page Load Time
Aaron Hopkins, Google Software Engineer, have an interesting article on Optimizing Page Load Time. In the article Aaron shared his work on optimizing page load times for a high-profile AJAX application, and investigation on reducing latency due to external objects.

It is widely accepted that fast-loading pages improve the user experience. In recent years, many sites have started using AJAX techniques to reduce latency. Rather than round-trip through the server retrieving a completely new page with every click, often the browser can either alter the layout of the page instantly or fetch a small amount of HTML, XML, or javascript from the server and alter the existing page. In either case, this significantly decreases the amount of time between a user click and the browser finishing rendering the new content.
He found many interesting results :
- Neither IE nor Firefox ship with HTTP pipelining enabled by default. This means each request has to be answered and its connection freed up before the next request can be sent.
- By default, IE allows only two outstanding connections per hostname when talking to HTTP/1.1 servers or eight-ish outstanding connections total. Firefox has similar limits. Using up to four hostnames instead of one will give you more connections.
- This means that serving small objects might mean the page load is bottlenecked on the users' upload bandwidth, as strange as that may sound.
To conclude he added some useful tips to reduce your page load time :
- Turn on HTTP keepalives for external objects
- Load fewer external objects
- If your users regularly load a dozen or more uncached or uncachable objects per page, consider evenly spreading those objects over four hostnames.
- Allow static images, stylesheets, and javascript to be cached by the browser.
- Minimize HTTP request size
- Minimize HTTP response size by enabling gzip compression for HTML and XML for browsers that support it
- Consider locating your small objects closer to your users in terms of network latency
- Regularly use your site from a realistic net connection.
The above list covers improving the speed of communication between browser and server and can be applied generally to many sites, regardless of what web server software they use or what language the code behind their site is written in.
Read full article here : http://www.die.net/musings/page_load_time/


Subscribe to AJAX Magazine's feed