How Much Weight Is Your Web Page Carrying?

Modern web apps are growing bolder in scope and functionality—an encouraging development. There is, however, a less pleasant side effect: the sheer volume of data each page downloads keeps climbing. If you want to deliver fast performance, your first job is to stop wasting bytes.

Measuring the Trend

Data from HTTP Archive provides a sobering look at the web's trajectory. By periodically crawling more than 300,000 of the most popular destination sites from the Alexa Top 1M list, the project tracks a range of metrics—resource counts, content types, and other metadata—for every URL.

HTTP Archive trends

50th percentile 75th percentile 90th percentile
HTML 13 KB 26 KB 54 KB
Images 528 KB 1213 KB 2384 KB
JavaScript 207 KB 385 KB 587 KB
CSS 24 KB 53 KB 108 KB
Other 282 KB 308 KB 353 KB
Total 1054 KB 1985 KB 3486 KB

Those figures show how downloaded byte counts grew for popular destinations between January 2013 and January 2014. Not every site gains weight at the same pace, which is why the distribution is broken out here by quantile: the 50th percentile (median), 75th, and 90th.

At the start of 2014, the median site delivered 75 requests totaling 1,054 KB over the wire. Both request counts and byte totals grew steadily throughout the preceding year. Faster connection speeds have not made this an academic concern: speeds progress unevenly across countries, and users on mobile are frequently saddled with data caps and metered plans.

The Cost of an "Instant" Web

One of the web's defining advantages is that applications need no installation step—you type a URL and it works. But that frictionless start has a precondition: the browser must retrieve dozens, sometimes hundreds, of resources that can total megabytes of data. To deliver the instantaneous experience users expect, all of that content needs to be assembled in hundreds of milliseconds.

That stringent target makes content efficiency a prerequisite for good performance. Success depends on removing any download that doesn't need to happen, applying the right compression and transfer encoding to everything that does, and leaning on caching to eliminate redundant trips to the server whenever the situation allows.