How to reduce web page download time in 4 (fairly) simple steps
If you’re using a mobile device such as an IPhone, IPad, Android handset or indeed any other device on anything other than a very consistently fast web connection, you’ll no doubt have experienced the frustration of slow page loads. So what can web developers do to improve the situation? We’re extremely unlikely to be able to convince web designers to use less graphical content in their layouts and customers certainly won’t like being advised not to upload imagery along with their textual content…so we need to make improvements from the source.
The 2 major factors (aside from the data connection which, beyond the data centre we have essentially no control over) in web page download speed are:
There are 4 fairly simple improvements which can almost always be made to a website which will provide some pretty big improvements alongside the traditional advice of “Export your JPEGs on the lowest acceptable quality setting”:
- CSS Sprites – Combining all possible CSS-specified images into a single image file (to reduce the number of HTTP requests)
Of course, your (sub)domains can be synonyms (E.G. CNAMEs) for the each other, as far as the browser is concernced, that’s still a different (sub)domain.
You should be aware that using more concurrent connections is very likely to increase your web server load so if your server margins are tight, proceed with caution!
- Web server output compression (HTTP compression) – Virtually every vaguely modern web server and web browser supports compression/decompression of web page source code, usually via GZip and/or Deflate methods – this works in a very similar way to “zipping” a file on your computer. Enabling output compression is usually as simple as changing a setting in your web server configuration file – I’d suggest searching the web for a tutorial if you don’t know how to do this.
On top of this, you should think about your markup, front-end scripts and stylesheets – keep it as minimal as you can whilst supporting all those nasty legacy web browsers (IE6 – that means you!).
So there we have it, 4 pretty simple steps to help combat the 2 biggest demons of web page download speed, data size and number of HTTP connections.
I hope that helps…