This is the first in a series of articles dealing with web site performance and how to improve it.
Why is the web so slow?
In the past decade, the Internet has had a huge investment in speed – broadband is available everywhere in the world.
The globe is connected by a criss-cross of high-speed fiber, and Microsoft, Mozilla and Google are continually one-upping each other with faster and faster web browsers.
There are 200 million web sites in the world, powered by the fastest computers, hosted in vast data centers happily consuming our energy.
With this much investment, we’ve got all the speed issues solved right? Every web page should now load instantly from anywhere in the world — right?
If you’re like me, the web is mixed with pleasure and frustration. Sites such as Google are super fast and fun to use. When I click on one of the search results, however, the web often slows to a crawl, and I’m left tapping my fingers waiting for a page to slowly load. Even this blog – building43.com — takes 20 to 30 seconds to load from my home in New Zealand.
To put it in perspective, this is the same length of time as watching a TV commercial. However, for those 30 seconds, instead of enjoying the building43 content, I’m watching an hourglass and waiting.
Last month, about 700 of us squeezed into the Fairmont San Jose hotel ballroom in San Jose, Calif., to attend the second O’Reilly Velocity conference. This is a conference dedicated to web performance.
Big companies such as Google are starting to present metrics that correlate speed with revenue.
For Google, increasing page-load times 500 ms resulted in 25 percent less traffic; adding the checkout shopping cart icon to search results slowed the page by 2 percent and led to 2 percent fewer searches per user.
For Shopzilla, speeding up their pages by five seconds resulted in a 25 percent increase in page views, and a 7 percent to 12 percent increase in revenue.
These metrics pass the “common sense” test. No one likes a slow web site because it breaks the cognitive flow. Imagine reading a book where you have to pause for 30 seconds in moving from page to page. It’s not going to happen. Speed matters.
Latency and page bloat
One focus of the Velocity conference was combating network latency. Network latency can be thought of as the performance tax to load a web site over distance.
Page-load times differ from around the world. A web site with servers located in London, England, is fast when accessed by someone nearby. The same site will be slower from San Francisco, and slower again from my country, New Zealand (where is New Zealand? Hint: it’s the last rest area before Antarctica).
This is latency at work. Travel times increase with distance. Even light takes 150 ms to make a round trip between London and New Zealand; each image, script and stylesheet on a web page will take an additional 150 ms to make the journey.
This is not a problem for a simple web page such as Google’s with just a text box and a couple of buttons. In the past decade, however, web pages have become increasingly bloated — sometimes with 100 or more images, scripts, styles and “resources” on a page, each one making a round trip from browser to server and adding to page bloat and slower page-load times for people around the world.
What can you do?
If you own a web site, the first thing you should do is measure your page-load times.
You can use the free “Page test” tool from the East Coast USA or New Zealand to see how fast your pages load. Simply enter your site’s URL and click Submit. It’s interesting to see the difference in load times from different parts of the world.
How fast should your site be? The real answer is “faster than your competitors.” A good guideline, however, is the 5 + 10 rule: 5 seconds or less is good. Up to 10 seconds is ok if you’ve got compelling content. Greater than 10 seconds and you’ll be losing business.
The good news is a web site can be fast. And, fixing performance issues is often as simple as following a few guidelines we’ll cover in the next article.