Most of my web career has been spent as a backend engineer.As such, I dutifully
approached each performance project as an exercise in backend optimization, concentrating
on compiler options, database indexes, memory management, etc.There’s
a lot of attention and many books devoted to optimizing performance in these areas,
so that’s where most people spend time looking for improvements.In reality, for
most web pages, less than 10–20% of the end user response time is spent getting the
HTML document from the web server to the browser.If you want to dramatically
reduce the response times of your web pages, you have to focus on the other 80–90%
of the end user experience.What is that 80–90% spent on? How can it be reduced?
The chapters that follow lay the groundwork for understanding today’s web pages
and provide 14 rules for making them faster.

Tracking Web Page Performance
In order to know what to improve, we need to know where the user spends her time
waiting.Figure A-1 shows the HTTP traffic when Yahoo!’s home page (http://www. is downloaded using Internet Explorer.Each bar is one HTTP request.
The first bar, labeled html, is the initial request for the HTML document.The
browser parses the HTML and starts downloading the components in the page.In
this case, the browser’s cache was empty, so all of the components had to be downloaded.
The HTML document is only 5% of the total response time.The user spends
most of the other 95% waiting for the components to download; she also spends a
small amount of time waiting for HTML, scripts, and stylesheets to be parsed, as
shown by the blank gaps between downloads.
The Performance Golden Rule
This phenomenon of spending only 10–20% of the response time downloading the
HTML document is not isolated to Yahoo!’s home page.This statistic holds true for
all of the Yahoo! properties I’ve analyzed (except for Yahoo! Search because of the
small number of components in the page).Furthermore, this statistic is true across
most web sites.Table A-1 shows 10 top U.S.web sites extracted from http://www. that all of these except AOL were in the top 10 U.S.web sites. was in the top 10, but its pages have little to no images, scripts, and
stylesheets, and thus was a poor example to use.So, I chose to include AOL in its

Table A-1. Percentage of time spent downloading the HTML document for 10 top web sites
Empty cache Primed cache
AOL 6% 14%
Amazon 18% 14%
CNN 19% 8%
eBay 2% 8%
Google 14% 36%
MSN 3% 5%
MySpace 4% 14%
Wikipedia 20% 12%
Yahoo! 5% 12%
YouTube 3% 5%