Even Faster Web Sites

Author: Steve Souders
Publisher: O'Reilly, 2009
Pages: 254
ISBN: 978-0596522308
Aimed at: JavaScript programmers
Rating: 4
Pros: Good advice about loading scripts asynchronously
Cons: Mixed collection of topics
Reviewed by: Ian Elliot

This is a follow-on to Steve Souders' first effort to help us make our websites run faster and this time it’s a team effort. It starts off with an essay by Douglas Crockford on Ajax performance which is short and mainly about the psychology and philosophy of optimisation – consider it a scene setter for the rest of the book.

After this the chapters focus on very particular ways in which time can be wasted as a web page loads. The second chapter considers latency, how to measure it and how to reduce it. Then we have an essays on how to split the downloading of initial resources, script downloading without blocking, synchronising script execution, inline scripts, efficient JavaScript, using Comet, problems with Gzipp, optimising images, tricks with domains, flushing, using or rather not using Iframes and finally simplifying CSS selectors. The book then considers some tools most of which should be well known to any JavaScript programmer.

This is a very slim book and while evidence is presented that some of the techniques presented do work much is left unquantified. As a result it is often difficult to know where to expend any effort on optimisation. In addition some of the essays go through a set of different ways of achieving a speed up only then to strongly recommend a single solution. This isn’t all bad however as it's amazing what you can learn simply by following how JavaScript can be made to do things it was never designed to.

In the main all of the techniques discussed are “small” and at the level of “tinkering” with the way things work. There are few architectural insights into how to organise a web application and perhaps this reflects the state of the art rather than the book. We clearly need some better tools and some better development environments for JavaScript that help the programmer select the best ways of implementing things. The book does touch on new technologies such as Google Gears, the Web Worker API, Microsoft’s Doloto system and Comet – but these are not central themes. This said the central themes – avoiding blocking, using efficient JavaScript and minimising the cost of using resources such as images and CSS – are important at the moment.

The book is worth its price just for the discussion of loading scripts asynchronously. It also happens to be a very good read if you are “into” JavaScript.

Last Updated ( Wednesday, 07 October 2009 )