Some salient points to be noted from this article on improving the page load times:
- Having KeepAlives on has two advantages: the extra time for TCP three way handshake is not necessary and slow start wont happen again – which means the current bandwidth window is used to get the data from the server.
- With ADSL connections (typical downstream to upstream ratioes being 5:1), if the request sizes are more, the upload bandwidth can become a bottleneck which means the page load time will be more.
- If we have pipelining enabled, the latency part of the pipe between the client and server can be reasonably hidden.
- By having more than one connection between the client and server, contents can be parallely downloaded.
- Use of AJAX will reduce the request/response sizes and hence things will download faster.
- The disadvantage of a KeepAlive connection is at the server side – the connection resources (which are limited) are held up there.
- KeepAlive is a HTTP layer concept – so the server will maintain a timer to kill the connections once the KeepAlive expires.
- Serving static content from a separate server meant for it will take the load off the dynamic content server.
- There is a technique called CSS Sprites that can be used to combine multiple small images into a single file so that all the images can be downloaded in one request thus taking latency out of the picture to some extent.
- When different hostnames are used (even if the IP address backing them is the same), browsers have a tendancy to open separate connections for each hostname. So, addressing different resources with different hostnames will also increase the page load time – the average latency is reduced by as many hostnames kept in the webpage.
- Preferably, the image loaded from a specific hostname is better loaded again and again from the same hostname because the contents may be cached.
- Content can not only be cached at the server side, but can also be cached at the browser side.
- Apparently the “Expires” header can be used to say how long the thing can be cached, but for what all objects it can be used is something that needs to be figured out.
- In general, a “?” found in the URL will make the cachers not cache it.
- Conditional GETs are also there – a piece of object specific stuff exchanged between the browser and the server will make the server send a “(304) Not Modified” back so that the browser need not load the whole object again.
- On the whole, the very desired feature – pipelining – is disabled by default on browsers (and Chrome is a bit worse – it does not support it at all) for reasons unknown.