Adverts

Archives By Subject

Calendar

Mon Tue Wed Thu Fri Sat Sun
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30            

Search

RSS


Tags

adobe apache book review cfimage coldfusion google google chrome hosting iis internet explorer java javascript jquery lucene photoshop regex ses urls software review sql injection svn trac

Subscribe

Enter your email address to subscribe to this blog.

Book Review: High Performance Web Sites

When a website is running slow, the traditional response has been to look at optimising the application code. In fact, 90% of the response time is taken downloading and rendering the page and it's constituent elements. In the book High Performance Web Sites, Steve Souders describes 14 rules for improving front-end performance.

The book is based on the experiences of Steve Souders in his job as Chief Performance Yahoo!, where he's worked on optimising several Yahoo! web sites. At this point, I'd like to mention a minor grumble I have with Yahoo Mail - the flash adverts on it kill my old laptop! This grievence is relevant, as rule 7 (avoid CSS expressions), is very similar. I can only assume that Yahoo Mail wasn't one of the sites he worked on...

Back to the main subject, and front-end performance has always been a consideration on the web. In recent times, proliferation of broadband may have made developers lazy about download times. Countering this though, has been the recent drive towards web-standards, moving away from heavy table based layouts and text as images, towards semantic mark-up and separation of design and content using CSS. This book moves on from here, encouraging you to reduce overall download weight, reduce the amount of hits to external assets (images/scripts/css) and enabling server caching and compression.

While these tips might be obvious to most developers, the book goes further, with guidelines on subjects such as combining files, reducing DNS look-ups, and where in the page to link external files. Some of these advanced rules should be used with care. Some, as Souders admits, contradict coding best-practices such as keeping code modularized. Other rules even contradict each other, such as rule 9 (reduce DNS look-ups) and rule 6 (put scrips at bottom). Souders doesn't hide from this, and discusses the circumstances where rules should be used, and the compromises that must be made.

The book also discusses how to analyize your webites, with mention of tools such as FireBug and YSlow. I've always been a big fan of FireBug, but hadn't heard of YSlow. It's a very simple FireFox plugin, which I would highly recommend.

The book finishes by analysing 10 of the biggest sites out there, and it is fairly obvious that this is where the focus of this book lies. While smaller sites will benefit from all of the tips in this book, some tips, like rule 2 (use a content delivery network) may be overkill and over budget. Putting these rules into practice will involve increased development and maintenance costs, so the ROI is likely to be better on busier sites.

My other big complaint is the neglect of IIS. Having analyzed a few of my sites, they performed quite well on most rules, with notable exceptions on rules that involved web-server configuration, such as gzipping components, setting expiry headers and e-tags. While full instructions are given on setting these in Apache, IIS is ignored. While I'm sure I can find instructions on the web, it wouldn't have hurt to add them here.

Despite this, I would recommend this book to all developers. At 168 pages, it's short but concise. A knowledge of these performance tips will stand you in good stead going forward.

Author Steve Souders
Publisher O'Reilly (Sep 2007)
ISBN 0-596-52930-9
Rating 8/10

Comments
Selvan's Gravatar A CDN needn't necessarily be expensive. You could just add a few sub-domains all pointing back to your website like s1.example.com, s2.example.com, this would fool the browser enough to make parallel requests to your web server. Then you could use s1 for all javascripts, and s2 for all images etc.

It may not improve the 'speed', but the page will certainly render faster because the browser downloads more files at the same time. A word of caution though: if you are using AJAX, make sure the all the related JS and urls refer to the same sub-domain. Otherwise it might be blocked as cross-domain scripting. You could also host your images on Amazon S3 and you've got yourself a cheap CDN!
# Posted By Selvan | 28/05/08 13:19
Gareth's Gravatar The books definition of a CDN was having servers in several geographical locations, to minimise the physical distance between your browser and the nearest server. As such, that's way outside my budget for this blog.

It does however suggest putting different assets on different (sub) domains to increase parallel requests. That's something I'm going to look at for future projects.

Thanks :)
# Posted By Gareth | 29/05/08 23:18
Adobe Certified Professional - Macromedia ColdFusion MX 7 Advanced Developer Powered By ColdFusion 8 aggregated by mxna aggregated by coldfusionBloggers