How big is a web page these days? Does the size of your pages matter?
Archive - Originally posted on "The Horse's Mouth" - 2011-12-26 13:18:50 - Graham Ellis
According to the BBC, the average web page is up in size from 726 kBytes to 965 kBytes in the last year. See [here]. Does this matter?
I first browsed the web with a modem - I remember stepping through modem generations at 9.6k, 19.2k, 28k, 33k and 56k bits / second. The slower speeds were used with email and newsgroups - I think web pages came when speed was around 33k, and I remember that we were always being told that we were pushing the limits of modem technology in those days. And in those days, to browse every bite mattered. Today's average page - as told by the BBC - would have taken nearly five minutes to download at 33k, even assuming flat out use of the phone line. Broadband - which we had installed in around 2000 - leapt speed up from 56k to 500k (Half Meg) and had grown since - our connections are now running at up to 100 Mbits, and that 5 minute download could now be completed five times every second.
But not everyone has a good broadband connection. Some parts of the country are slower. And mobile access is much slower, and a significant part of the market. So it still pays to look at your page size and tune your site.
So what makes for one of those average BBC pages of nearly a Megabyte?
• HTML - these should very rarely be a large proportion of big pages, even though they're usually the page names you call up. The HTML element of web pages you download will include the text of the page, and instructions as to what other resources to pull in to complete the page - and those elements are where the majority of your page load time will be taken.
• Style - Cascading Style Sheets describe the look and feel of your web page. The CSS may be included within the HTML page, but more usually it's a separate resource called up from within the HTML. Like the HTML, the size of the CSS really shouldn't be all that large - but it's all too easy to clutter up your style file with loads of extra and redundant styles - making maintenance all the harder, and slightly slowing downloads of the page as a whole.
• Images - Commonly .jpg, .gif or .png files. A picture paints a thousand words, but, alas, sometimes a picture's download is slower that ten thousand words. With screen resolution and line speed increased, there are reasons for images to be larger than they were a year or two ago, but it's still all to easy to design a web page that loads images to a far higher resolution than it needs to, with a significant effect on download time at no real gain.
• JavaScript - According to the BBC's report, this is the huge growth area this year. With libraries such as JQuery downloaded within your pages, load size can rocket. JQuery, for example, can come down as 1/4 Mbyte. Very impressive, very powerful - but you should be very careful. Similarly with Flash, Java Applets, ActiveX components
But, alas, it's not that simple in practice
• Each page of HTML on a website will be different. But the Style Sheet, much of the JavaScript, and many of the images will repeat from page to page, and will be cached by the browser. That way, repeated downloads are substantially avoided.
• Many page requests of a web server are made by automated and robotic applications, which are unlikely to call up the subsidiary pages.
• Downloads may also include video streams, large .pdf documents, software, audio streams and much more which may effect the statistics.
Our own story - www.wellho.net
In November 2010, the average download size of a page called up by a real user was 63k bytes, comprising 3.25 requests on the server (1 HTML file, a style sheet, and an image or two)
In November 2011, the average download size had grown to 90k. We were being somewhat more efficient in caching, as the number of requests onto the server per page had dropped, indicating an improvement in caching.
Our page breadth remains tiny compared to the average - but like the average it has grown. That's not Javascript in our case - it's largely a conscious decision to use larger images and to allow them to download and be cached at a higher resolution. Newer pages are using the more detailed images, so I would expect the 90k figure to continue to grow - perhaps to around 110k or 120k over the next year or two, barring other changes.
Our stats are based on server accesses in November 2010 and November 2011, totaling 7,100,000 accesses of which 5,270,000 were real user requests comprising about 1,850,000 page requests and their subsidiary requests over the sum of the two 30 day periods.
You can see the source of the program we used (Perl) for our own stats [here].