We have used Yslow, Yahoo’s performance plugin to Firefox, to analyze the performance of the top 100 websites in the US according to Alexa. The results were both surprising and interesting.
Yslow will rank websites using 13 different criteria that are known to affect website performance, such as the number of HTTP request, how scripts and CSS are handled, etc. The performance grades are A, B, C, D and F (for fail), with A being the best.
The worst performance grades were given to Foxnews.com, IGN.com, Gamespot.com, CNN.com, Break.com and ESPN.go.com.
The best performance grades were given to Google.com, Live.com, Orkut.com and Craigslist.org. This is not entirely surprising considering their minimalistic style.
The overall results are as follows:
The really interesting part comes when you take a closer look at the breakdown of the data that Yslow provides. Since we deal with uptime and performance monitoring ourselves here at Pingdom, we find these results fascinating, but anyone with the slightest interest in web design should take notice.
One in ten of the websites weigh in at over 1 MB in size if no content has been previously cached. Some of the pages are more than 2 MB in size.
Perhaps not unsurprisingly, the largest (size wise) websites are media heavy websites such as NBA.com, MLB.com, IGN.com, WorldofWarcraft.com, Gamespot.com, Adobe.com, Target.com and CNN.com.
A large portion of the size of these websites consists of images and Flash objects. For example, a test of NBA.com showed a total page size of 2.2 MB, of which 1.3 MB was taken up by images and 550 KB taken up by Flash objects. If you are a sports fan, you better have a broadband internet connection.
Too many HTTP requests
Many of these websites contain a very large amount of objects such as images. Each separate object on a web page requires an HTTP request to retrieve it to the web browser, so using a lot of HTTP requests is a sure way to slow down a website because it results in a lot of communication overhead with the web server. Out of the 100 websites in this survey, 19 used more than 100 HTTP requests. Three used more than 200.
Some web pages will due to the nature of their content have a lot of HTTP requests, but it is still important to try to minimize this. It is an overhead both on the web browser’s end, but it might also be worth keeping in mind that the load on the web servers will be lower if the number of HTTP requests can be reduced.
Caching can make a BIG difference
Our survey also shows that on average between these sites, the necessary download is reduced by 83% when the website content has been cached by the web browser (for example refreshing a page after the initial visit).
However, according to research made by developers at Yahoo, the percentage of page views with an empty cache is around 20%. That means that it is very important to keep the size of the web pages down and not count too blindly on caching to help performance. Not only first-time visitors will have an empty cache.
That said, there are significant gains to be made by optimizing the caching efficiency for a website, especially for websites with such enormous amounts of traffic as these. While the average size reduction thanks to caching is quite high (83% as already mentioned), many of the websites are closer to a 50% size reduction, meaning that there is a lot of room for improvement. With better caching, visitors will get a faster website, and the website owners will save on bandwidth costs.
Let us illustrate this with an example: Take a million page views for a page that is 1 MB without the caching. According to Yahoo’s results, around 80% of the page views will benefit from caching. That would be 800,000 “cached” page views. If the website can increase caching by 10%, this would save 100 KB per page view. That would result in bandwidth savings of 80 GB for every million page views.
And these sites have way more than a million page views on a daily basis. The long-term cost savings for bandwidth would be considerable, and the initial cost is just a one-time small design change.
That 54 out of 100 top websites got a failing grade was a surprise. We had expected something more along the lines of 10%.
It was noteworthy how “heavy” many of these websites are, with a large amount of images and Flash files. For users without a decent broadband connection, such websites will be basically unusable.
We also have to give a general thumbs up to the Yslow tool, since it’s so easy to use and still gives a very good starting point for people who want to optimize the performance of their websites. Another useful resource from Yahoo is their page with performance “best practices”.
Some notes on the survey:
- For those interested, you can download an Excel file with the survey results.
- We did not login to pages that required a login. This may have favored some sites.
- We removed two of the domain names found in the Alexa top 100, since their appearance there is an anomaly and they were not proper web pages (msplinks.com, which Myspace uses to filter outgoing links, and googlesyndication.com, which Google uses to serve ads.)
- Yslow will automatically subtract points for the CDN criteria since they only match against the CDN Yahoo uses. However, we feel that the sites in the test were equally affected by this and manually finding and adding CDNs for all the websites was outside the scope of this survey.