2 MB is a lot of HTML

2 MB or not 2 MB?
The fairly recent update of the support documents, clarifying that Googlebot will now effectively cap uncompressed HTML resources larger than 2 MB has caused a a few ripples.
But genuinely, it's not that big of a deal. In fact, for nearly all sites, it's not a deal at all. The vast majority of HTML documents are well under 2 MB, and if your site is generating HTML documents larger than that, you probably have bigger issues to worry about.
How big are HTML documents, really?
I was lucky enough to have filled the analyst role for the HTTP Archive Web Almanac's Page Weight Chapter this year, and I've seen a number of folks cite that, and specifically the HTML bytes section giving the 33 KB as the median size of HTML documents.
But to clarify a couple of points:
- This is the size of the request across the network
- This is all HTML resources called by the page, not just the main document
So I dug a little deeper into the data, for just the main document, and also got the uncompressed size, and the results are still just as reassuring, 2 MB is 2000 KB, and the median size of HTML documents is still just a fraction of that, even when looking at the uncompressed size.
Home Pages
| Percentile | Desktop (Network / Uncompressed Size) | Mobile (Network / Uncompressed Size) |
|---|---|---|
| 10th | 3.83 KB / 11.05 KB | 4.13 KB / 11.58 KB |
| 25th | 10.24 KB / 38.89 KB | 10.20 KB / 39.73 KB |
| 50th (Median) | 21.90 KB / 101.50 KB | 21.56 KB / 101.94 KB |
| 75th | 40.64 KB / 212.68 KB | 40.12 KB / 212.45 KB |
| 90th | 79.55 KB / 426.56 KB | 80.04 KB / 433.51 KB |
| 100th | 69342.92 KB / 125653.70 KB | 93326.74 KB / 480746.79 KB |
Inner Pages
| Percentile | Desktop (Network / Uncompressed Size) | Mobile (Network / Uncompressed Size) |
|---|---|---|
| 10th | 5.3 KB / 14.59 KB | 5.47 KB / 15.32 KB |
| 25th | 10.91 KB / 39.12 KB | 10.94 KB / 39.62 KB |
| 50th (Median) | 20.73 KB / 90.86 KB | 20.48 KB / 90.30 KB |
| 75th | 38.39 KB / 188.48 KB | 37.72 KB / 184.30 KB |
| 90th | 74.66 KB / 392.72 KB | 73.52 KB / 385.30 KB |
| 100th | 122.11 KB / 644.28 KB | 90075.17 KB / 345995.61 KB |
So it's not until you get to the 100th percentile (the largest documents) that you even get close to the 2 MB limit, even when looking at the uncompressed size.
So are there sites out there with HTML documents larger than 2 MB? Of course. But they are the exception, not the rule, and if you have a site that is generating HTML documents larger than 2 MB, you probably have bigger issues to worry about than Googlebot crawling your site, or a very specific use case that you need to address.
If you are concerned about this for your site, I have added a checkbox to my fetch and render tool that will truncate text resources at 2 MB, so you can see how your site would be affected by this change. But again, for the vast majority of sites, this is not something you need to worry about.
If you don't check that box, the tool will show you the full uncompressed size of the HTML document, so you can see how close you are to the 2 MB limit.
About the Author:
Dave Smart
Technical SEO Consultant at Tame the Bots.