Archive for July, 2011

Background to the "Forgotten Art of Web Performance"

Monday, July 18th, 2011

Image courtesy of Wedo Photography

I wanted to write a little bit of background to why I gave this talk at WDCNZ. I got hassled a little bit by the other presenters on why I gave this talk. That web performance was “Old Hat” and companies have known about this for 5 years. That’s correct, but very very few companies are doing it right especially in New Zealand. I would have loved to give a talk on advanced web performance techniques like Varnish and Edge Side Includes or how to handle 10K requests a second on a VM. BUT with the data from my Web page test results, fewer than 10% websites in New Zealand are doing it right.

Here’s the facts, if all New Zealand websites did four things

  • Turn on web compression
  • set expiry properly for images css and JS,
  • Bundle JS and CSS files
  • use image spriting

Every New Zealand website would be TWICE AS FAST.

I do a lot of Research and Development on web performance, I do consulting and I talk to a lot of companies about web performance. What I find the companies don’t understand enough about the operational side of their websites ie what is happening at the webserver and database. Some of the basic principles about how web sites scale is completely oblivious to some developers. eg. the difference between dynamic and static content.

In my talk I had to pick one site which has had all of the characteristics of bad web performance. Unfortunately the newstalkzb was the one that I choose. I could have been chosen several other websites. There are a lot of really really bad preforming websites. (As a sector blogs and news sites have a lot of work to do to improve performance)

I was thinking of a what to highlight just how “backward” the thinking in Web performance in modern terms. I came up with an idea of what was the worst html techniques that no web developer in their right mind would use today. So I made the correlation between 1990’s web design and bad web performance traits. Just as we have moved on from those designs to better designs, we need to progress web performance to next level in NZ. Its not hard to make significant performance wins.

I want developers and companies to take professional pride in their work and do a good job. I have seen very talent company release a website for a blue chip client with a 122 CSS files, which caused the site to take over 10 seconds to load. I’m sorry I can’t that seriously. Not very professional! I would want my company to be associated with kickass, innovative, FAST websites.

For those that have asked me, here is the video

How ugly is bad web performance from John Clegg on Vimeo.

WPO setting = BAD Design
No HTTP compression = Blink text
Poor expiry settings on static assets = Marquee text
No Javascript / No CSS bundling = Comic Sans font
No Image Spriting = Animated Gifs

Thanks to Martin Hipp for hacking the HTML for me!

Mobile is our future

Web Performance is even more important is Mobile. All of the web performance strategies and tactics are a lot more relevant with mobile as network latency is much much worse. The top minds in web performance are now starting to focus on Mobile, as a result the tools and best practices are being defined as we speak.

Should how we fix it?

Service companies must make it a priority with their clients. I bet that clients expect that their website will be the fastest possible. They do not understand that it has to built that way.

The best way to make Web performance happen is to make it a part of the build process of your website. There are plenty of tools to make Javascript and CSS bundling a part of your build and deployment process of your website. Then Web optimisation happens automagically everytime!

For service companies, creating a common build process with bunding and image spriting will become a small incremental cost that can be re-applied across all your clients.

If that sounds like too much work then look at mod_pagespeed module for apache or commercial solution Aptimize

In web performance – total number of request matters

Sunday, July 17th, 2011

Correlation between page load time and total number of requests

Here is new image from my latest research of homepage performance.

This clearly shows the correlation between page load time and number of requests. The pageload time increases, so does the number of requests on the page.

From my presentation at WDCNZ, I recommend less than 60 total requests for a page, if you want to have a fast website.

Looks like there still a _lot_ of work to be done in speeding up NZ websites.

Homepage hall of shame – July 2011

Saturday, July 16th, 2011


This is the latest installment of the “Home page hall of Shame” which is an independent audit of the state of Web Page Optimisation in New Zealand. This test takes the top 160 New Zealand based websites from Alexa rankings and compares a number of different metrics – Page Size, Download time, optimisation scores and Javascript optimisation.


  • The homepages for 160 of the top NZ based websites was measured using on 1.5Mb DSL and 20Mb connection Thanks to
  • The average page size of homepages was 661.8K Up from (554.6K in Dec 2010 359.6K in May 2009 & 305.1K in 2008)
  • Fastest home pages load < 2 sec. Top site loads in 1.1 secs !
    • The average download time for office broadband – 5.98 secs(3.97 secs for page reload)
    • The average download time for home broadband connection – 12.43 secs (5.21 secs for page reload)
  • 66% of websites use  WEB COMPRESSION
  • Only 35% of sites load in under 4 seconds.
  • The largest pages were over 4000K. The largest site was 4Mb and with one image over 3Mb.
  • A lot Advertising javascript still is not being compressed
  • Some sites have dozens of Javascript and CSS files, worst offender had 54 javascript files.
  • The fastest sites have less total requests. There seems to be a strong co-relation to lower total requests to speed.

Percent of sites that got a passing grade for the basic optimization checks:

Optimization Percent of pages with a passing grade (2011)
Keep-alive Enabled 89.4%
Compress Text 61.55%
Cache Static 31.4%
Compress Images 66.4%

Download time distribution – Office Broad band (20Mb)

Table 1 – Shows the distribution of download times of the top 160 home pages using office broadband speed.

Time Frequency
<1 0 (0%)
1 – 2 12 (7.55%)
2 – 3 24 (15.09%)
3 – 4 19 (11.95%)
4 – 5 27 (16.98%)
5 – 6 22 (13.84%)
6 – 7 13 (8.18%)
7 – 8 12 (7.55%)
8 – 9 6 (3.77%)
9 – 10 4 (2.52%)
10-12.5 3 (1.89%)
12.5-15 9 (5.66%)
15+ 8 (5.03%)

Download time distribution – Home Broad band (1.5Mb)

Table 1 – Shows the distribution of download times of the top 160 home pages using home broadband speed.

Time Frequency
<1 0 (0%)
1 – 2 2 (1.26%)
2 – 3 8 (5.03%)
3 – 4 6 (3.77%)
4 – 5 17 (10.69%)
5 – 6 16 (10.06%)
6 – 7 21 (13.71%)
7 – 8 16 (10.06%)
8 – 9 9 (5.66%)
9 – 10 16 (10.06%)
10-12.5 22 (13.84%)
12.5-15 10 (6.29%)
15+ 6 (3.77%)

What should we do to improve

The Data


What? This table shows the top ranking home pages with highest optimisation scores as ranked by performance ranking tools YSlow and Pagespeed.

How? We used the website to record the score for the test.

Why is this important? This result shows which sites are best optimised for web performance. The sites  are optimised sites for fastest downloading and reloading of pages.

Top 10 most optimised sites

Site YSlow Rating Page speed Combined Score 95 98 193 87 95 182 91 90 181 84 96 180 92 86 178 88 89 177 84 92 176 87 88 175 83 92 175 76 93 173

Top 10 worst optimised sites

Site YSlow Rating Page speed Combined Score
Courier Post 75 15 90 73 17 90 50 45 90 63 38 101 80 25 105 66 41 107 71 37 108 71 37 108 68 61 109 42 57 109

Download time

What? This table shows the top ranking home pages with fastest and slowest download times .

How? We used the website website on 1.5Mb DSL connection Broadband and 20Mb Office network connection in Wellington NZ to simulate a fair test of all the webpages. The test took page over the week of the 2nd to 11th of July.

Why is this important? This result shows which sites are fastest to load for users. The faster the website, the more pages that a user can visit in the allotted time.

Top 10 fastest home page download speed using Office broadband

Site Size (K) Total requests first load time
– Broadband (secs) 274.4K 32 1.171s 121K 21 1.234s 124K 17 1.489s 170K 32 1.58s 401K 37 1.596s 31K 13 1.623s 105K 21 1.729s 52K 7 1.731s 431K 41 1.786s 385K 20 1.874s

Top 10 slowest home page download speed using Office Broadband

Site Size (K) Total requests time first load time
– Broadband (secs) 991K 116 26.88s 4076K 92 20.917s 3293K 186 20.092s 1765K 151 17.199s 828.1K 105 16.491s 410K 55 16.381s 900K 142 16.287s 1195K 179 15.081s 1541K 202 14.6s 1052K 160 14.353s


What? This table shows the largest and smallest home pages by total download size .

How? We used YSlow to provide the tool download size of the home page including all the HTML , Javascript, CSS, image and Flash files.

Why is this important? This highlights the total size of some of the home page. Some of these webpages sizes are out of control and webmaster need to think about the time that it takes to load their sites.

Top 10 largest home pages by size

Site Size (K) Total requests 4076K 92 3293K 186 2141K 140 1765K 151 1762K 216 1642K 89 1610K 68 1541K 202 1429K 7.938 1396K 110

Top 10 smallest home pages by size

Site Size (K) Total requests 31K 13 52K 7 76K 19 83K 28 105K 21 121K 21 124K 17 130K 23 133K 15 169K 26


What? This table shows which sites have the fastest reload time. ie. this is the 2nd loading of a site after an initial load.  This is an indication of effective are the cacheability of the webpage.

How? We used the website website on 20Mb Office connection Broadband in Wellington NZ to simulate a fair test of all the webpages. The test took page over the week of 2nd to 11th of July.

Why is this important? This test shows which sites will load fastest for regular users. A cacheable site will load quickly as the browser does not have to reload all the content that hasn’t change (static content)

Note: There seems to be some problems with the reload calculation as and should be at the top of this table but for some reason they are not.

Top 10 fastest cached pages – 2nd reload of a page

Site Size (K) Total requests time first load – Broadband (secs) Cached load – Broadband (secs) 83K 28 1.971s 0.822s 743K 26 3.3s 0.842s 31K 13 1.623s 0.844s 124K 17 1.489s 0.866s 76K 19 4.838s 0.929s 121K 21 1.234s 0.939s 176K 28 5.355s 1.018s 52K 7 1.731s 1.054s 604K 32 2.108s 1.1078s 502K 31 2.51s 1.103s


What? This table shows which sites have most javascript files on the home page.

How? We used YSlow to provide the number of the javascript files used on the web page.

Why is this important? Javascript files can be bad for your website if they are not properly optimised and loaded in the correct way. The scripts can be block the downloading of any other content on the webpage.  The more javascript files on the site can make the page very slow while the user has to wait until the browsers loads all the javascript then continues to render the page.

Top 10 home pages with most javascript files

Site Size (K) Total requests # of Javascript Files time first load- Broadband (secs) 1765K 151 54 17.199s 917K 156 47 5.7s 1541K 202 35 14.698s 1195K 179 33 15.081s 824K 130 33 4.912s 1762 216 32 7.931s 528K 72 32 13.622s 1022K 146 30 13.267s 832K 72 32 5.929s 870K 114 29 5.892s

SEO training on Tuesday

Sunday, July 10th, 2011

I’m giving a half day  SEO training session on Wednesday for NZCS in Wellington. Pricing starts from $230 for NZCS members and $345 for the general public. This course is open to everyone.

This course has been derived from the specialist consulting that I have provide my clients over the past few years and my learning from running a number of sites for the last ten years. I’ve added some new slides from recent findings on the effectiveness of Twitter and Google+

The workshop includes the following:

Introduction to Search Engine Optimisation (SEO) and Search Engine Marketing (SEM)

  • What is SEO?

  • SEO and online marketing (SEM)
  • SEO Key concepts
  • SEO – Science or Magic?
  • Paid Ads
  • SEO in practice
  • Page / Content Optimisation
  • Site Optimisation
  • Link building
  • SEO and Social Media
  • Tools

More courses are available in Auckland and Christchurch later in the year.