web site optimization

OptimizationWeek.com

Website performance news and views™

   
   
Home Sitemap Issues About Contact
Free newsletter
home > reviews > average-web-page

The Average Web Page

Summary: We report on some preliminary results for the size and composition of the average web page.

What is the size of the average web page? How have web pages changed over time? Few studies have been done recently until now (King 2003). Ryan Levering, a PhD student at Binghamton University and Michal Cutler from the same school set out to find how the average page is rendered visually (Levering and Cutler 2006).

WebSeer HTML Rendering Engine

After surveying the field they wrote their own HTML rendering engine they call WebSeer. Using parts of the Gecko code base Ryan and Michal pieced together a web page rendering engine that parses and interprets web pages on the server. Their report titled "The Portrait of a Common HTML Web Page" shows the results from a psuedo-random crawl from the DMOZ directory and associated pages. The paper focuses on web page area usage, position, and frequency of use. All interesting and useful metrics that we'll report on in a future article, but we wanted to find out size-related data.

Try Another Crawl for Size

After discussing the issue with Ryan, he agreed to run another crawl with his WebSeer tool to get size-related data. These are preliminary results based a couple thousand page run using random pages from the DMOZ directory as "seed" pages. Seed pages are crawled and pages they linked to are also included in the analysis. The preliminary results have the following caveats:

  1. CSS images not included
  2. Framed pages were ignored, though internal frames were included
  3. Only media objects using the embed tag are included
  4. Only included unique objects in page sizes (as browsers cache objects with identical URLs)
  5. HTTP compression not turned on

With these caveats in mind, here are the results for the average web page.

Table 1: Average Web Page Statistics (file size in bytes, preliminary)

Web Page ComponentSize in bytes
Average Total HTML size (including internal frame HTML):25K
Average GIF size: 2.9K
Average JPEG size: 11.9K
Average PNG size: 14.5K
Average SWF size: 32K
Average Total external script size: 11.2K (37.5K just pages that use it)
Average Total external style size: 17K (28.7K just pages that use it)
Average Total page size (script/style/flash/images/html): 130K

Observations and Explanation

Some observations and explanation of the results are in order here. The results are for the uncompressed sizes, the 130K average web page size does not included CSS images, and is the average for all pages tested after their HTML, CSS, and JavaScript have been decompressed. Some larger pages (CNN.com for example) skewed the results higher, most pages were in the 70-80K range. However, some larger pages used HTTP compression, which will push the average down a bit for our next run.

Average HTML and Object Sizes

HTML page size averaged 25K. For the images, GIFs were the smallest on average, at 2.9K. GIFs are often uses as spacers and simple flat-color icons so the results are no surprise. JPEGs averaged 11.9K, nearly 4 times larger than the average GIF. JPEGs are typically used for smooth-toned images like photographs and product shots. PNGs averaged 14.5K, a bit larger than the average JPEG. With their superior horizontal and vertical compression scheme, we've found PNG-8s to be more efficient than GIFs in most cases.

Average CSS and Script File Sizes

For the external scripts and styles, the lower figure (11.2K for all pages' external scripts for example) is the average for all pages tested, whether they used scripts or not. For those pages that did use external scripts, the scripts averaged 37.5K uncompressed in total. The average total external CSS (for pages that used external CSS files) was 28.7K uncompressed.

Conclusion

Although these are preliminary results, the data gives us an idea of the size and composition of the average web page. Without compression and CSS images, the average web page is about 130K in size, with a 25K HTML file, small GIFs and larger JPEGs, PNGs, and SWF files when used. For those pages that use them external scripts averaged in total 37.5K and external style sheets averaged in total 28.7K per page. The HTML figures are in line with the home page trend I reported on in Speed Up Your Site where the average home page HTML file size grew from 8,297 to 28,290 bytes from 1996 to 2002. However as web pages become more complex, each individual component adds size and HTTP requests to the total page payload.

Further Reading

King, A. (2008) "Average Web Page Triples Since 2003
Within the last five years, the size of the average web page has more than tripled, and the number of external objects has nearly doubled. While broadband users have experienced somewhat faster response times, dial-up users have been left behind. April 28, 2008.
King, A (2003) "HTML Optimization," Web Page Size Inflation
Using a brief survey with the Wayback Machine at archive.org, I found the average "home page" HTML size of five of the busiest sites has increased from 8,297 to 28,290 bytes between 1996 and 2002. During that time the bandwidth of most home users increased from 28.8Kbps to 56.6Kbps.From Chapter 3 of Speed Up Your Site: Web Site Optimization, New Riders Publishing, Indianapolis, Indiana.
Levering, R., and M. Cutler (2006), "The Portrait of a Common HTML Web Page,"
Paper surveyed over 21,000 web pages for visual features, position, and technology usage. Using a custom HTML rendering engine called WebSeer, the authors took a pseudo-random sample based on the DMOZ directory and found the proportion of image, text, form, and object usage and visual weight for the average web page. From DocEng'06, October 10–13, 2006, Amsterdam, The Netherlands.
Levering, R. (2006)
Ryan Levering's home page describes his quest for the best HTML rendering engine.

About the Author

Andy King is the founder of five developer-related sites, and the author of Speed Up Your Site: Web Site Optimization (http://www.speedupyoursite.com) from New Riders Publishing. He publishes the monthly Bandwidth Report, Optimization Week, and Speed Tweak of the Week.