diff --git a/src/templates/en/2019/chapters/markup.html b/src/templates/en/2019/chapters/markup.html index f828a705daa..6c41b41664b 100644 --- a/src/templates/en/2019/chapters/markup.html +++ b/src/templates/en/2019/chapters/markup.html @@ -331,7 +331,7 @@

Perspective on value and usage

Lots of data: real DOM on the real web

With this perspective in mind about what use of native/standard features looks like in the dataset, let's talk about the non-standard stuff.

You might expect that many of the elements we measured are used only on a single web page, but in fact all of the 5,048 elements appear on more than one page. The fewest pages an element in our dataset appears on is 15. About a fifth of them occur on more than 100 pages. About 7% occur on more than 1,000 pages.

-

To help analyze the data, I hacked together a little tool with Glitch. You can use this tool yourself, and please share a permalink back with the @HTTPAchive along with your observations. (Tommy Hodgins has also built a similar CLI tool which you can use to explore.)

+

To help analyze the data, I hacked together a little tool with Glitch. You can use this tool yourself, and please share a permalink back with the @HTTPArchive along with your observations. (Tommy Hodgins has also built a similar CLI tool which you can use to explore.)

Let's look at some data.

Products (and libraries) and their custom markup

For several non-standard elements, their prevalence may have more to do with their inclusion in popular third party tools than first party adoption. For example, the <fb:like> element is found on 0.3% of pages not because site owners are explicitly writing it out but because they include the Facebook widget. Many of the elements Hixie mentioned 14 years ago seem to have dwindled, but others are still pretty huge:

diff --git a/src/templates/en/2019/chapters/page-weight.html b/src/templates/en/2019/chapters/page-weight.html index cc43154e2f8..ba00b3dee5e 100644 --- a/src/templates/en/2019/chapters/page-weight.html +++ b/src/templates/en/2019/chapters/page-weight.html @@ -10,7 +10,7 @@ - make changes to the markdown content directly (`src/content///.md`) because any changes to the chapter templates will be overwritten by the generation script #}--> -{% set metadata = {"part_number":"IV","chapter_number":18,"title":"Page Weight","description":"Page Weight chapter of the 2019 Web Almanac covering why page weight matters, bandwidth, complex pages, page weight over time, page requests, and file formats","authors":["tammyeverts","khempenius"],"reviewers":["paulcalvano"],"published":"2019-11-04T12:00:00+00:00:00","last_updated":"2019-11-04T12:00:00+00:00:00 "} %} {% block description %}{{ metadata.get('description',metadata.get('title') + ' chapter of the ' + year + ' Web Almanac') }}{% endblock %} {% block meta %} +{% set metadata = {"part_number":"IV","chapter_number":18,"title":"Page Weight","description":"Page Weight chapter of the 2019 Web Almanac covering why page weight matters, bandwidth, complex pages, page weight over time, page requests, and file formats","authors":["tammyeverts","khempenius"],"reviewers":["paulcalvano"],"published":"2019-11-04T12:00:00+00:00:00","last_updated":"2019-11-04T12:00:00+00:00:00"} %} {% block description %}{{ metadata.get('description',metadata.get('title') + ' chapter of the ' + year + ' Web Almanac') }}{% endblock %} {% block meta %} @@ -98,20 +98,16 @@ @@ -221,662 +217,727 @@

{{ render_byline() }} -

Chapter 18 • Page Weight

-

Introduction

-

The median web page is around 1900KB in size and contains 74 requests. That doesn’t sound too bad, right?

-

Here’s the issue with medians – they mask problems. By definition, they focus only on the middle of the distribution. We need to consider percentiles at both extremes to get an understanding of the bigger picture.

-

Looking at the 90th percentile exposes the unpleasant stuff. Roughly 10% of the pages we’re pushing at the unsuspecting public are in excess of 6MB and contain 179 requests. This is, frankly, terrible. If this doesn’t seem terrible to you, then you definitely need to read this chapter.

-

Myth: Page size doesn’t matter

-

The common argument as to why page size doesn’t matter anymore is that, thanks to high-speed internet and our souped-up devices, we can serve massive, complex (and massively complex) pages to the general population. This assumption works fine… as long as you’re okay with ignoring the vast swathe of internet users who don’t have access to said high-speed internet and souped-up devices.

-

Yes, you can build large, robust pages that feel fast… to some users. But you should care about page bloat in terms of how it affects all your users, especially mobile-only users who are dealing with bandwidth constraints or data limits.

-

(Check out Tim Kadlec’s fascinating online calculator, What Does My Site Cost?, which calculates the cost – in dollars and Gross National Income per capita – of your pages in countries around the world. It's an eye-opener. For instance, Amazon’s home page, which at the time of writing weighs 2.79MB, costs 1.89% of the daily per capita GNI of Mauritania. How global is the world wide web when people in some parts of the world would have to give up a day’s wages just to visit a few dozen pages?)

-

More bandwidth isn’t a magic bullet for web performance

-

Even if more people had access to better devices and cheaper connections, that wouldn’t be a complete solution. Double the bandwidth doesn't equal twice as fast. This assumption has had holes poked in it a number of times (such as this example, which demonstrated that increasing bandwidth by up to 1233% made pages just 55% faster).

-

The problem is latency. Most of our networking protocols require a lot of round-trips. Each of those round trips imposes a latency penalty. Latency is governed, at the end of the day, by the speed of light. For as long as latency continues to be a performance problem (which is to say, for the foreseeable future), the major performance culprit will continue to be the fact that a typical web page today contains a hundred or so assets hosted on dozens of different servers. Many of these assets are unoptimized, unmeasured, unmonitored – and therefore unpredictable.

-

What types of assets does the HTTP Archive track, and how much do they matter?

-

Here’s a quick glossary of the page composition metrics the HTTP Archive tracks, and how much they matter in terms of performance and user experience:

-

Total size – This is the total weight in kilobytes of the page. It matters especially to mobile users who have limited and/or metered data.

-

HTML – HTML is typically the smallest resource on the page. Its performance risk is negligible.

-

Images – Unoptimized images are often the greatest contributor to page bloat. Looking at the 90th percentile of the HTTP Archive data gathered for the Almanac, images accounted for a whopping 5220KB of a roughly 7MB page. In other words, images comprised almost 75% of the total page weight. The number of images on a page has been linked to lower conversion rates on retail sites. (More on that later.)

-

JavaScript – JavaScript matters. A page can have a relatively low JS weight but still suffer from JS-inflicted performance problems. A single 100KB third-party script can wreak havoc with your page. The more scripts on your page, the greater the risk.

-

It's not enough to focus solely on blocking JS. It's possible for your pages to contain zero blocking resources and still have less-than-optimal performance because of how your JavaScript is rendered. That's why it's so important to understand CPU usage on your pages – because JavaScript consumes more CPU than all other browser activities combined. While JS blocks the CPU, the browser can't respond to user input. This creates what’s commonly called “jank” – that annoying feeling of jittery, unstable page rendering.

-

CSS – Stylesheets are an incredible boon for modern web pages. They solve a myriad of design problems, from browser compatibility to design maintenance and updating. Without stylesheets, we wouldn’t have great things like responsive design. But, like JavaScript, CSS doesn’t have to be bulky to cause problems. Poorly executed stylesheets can create a host of performance problems, ranging from stylesheets that take too long to download and parse, to improperly placed stylesheets that block the rest of the page from rendering. And like JS, more CSS files equals more potential trouble.

-

Bigger, complex pages can be bad for your business

-

Let’s assume you’re not a heartless monster who doesn’t care about your site’s visitors. But if you are, you should know that serving bigger, more complex pages hurts you, too. That was one of the findings of a Google-led machine-learning study that gathered over a million beacons worth of real user data from retail sites.

-

There were three really important takeaways from Google’s research:

-

**1. The total number of elements on a page was the greatest predictor of conversions. **Hopefully this doesn’t come as a huge surprise to you, given what we’ve just covered about the performance risks imposed by the various assets that make up a modern web page.

-

2. The number of images on a page was the second greatest predictor of conversions. Sessions that converted users had 38% fewer images than sessions that didn't convert.

-

Chart showing 19 converted session vs. 31 non-converted sessions

-

3. Sessions with more scripts were less likely to convert. What’s really fascinating about this chart isn’t just the sharp drop-off in conversion probability after about 240 scripts. It’s the huge longtail that demonstrates how many retail sessions contained up to 1440 scripts!

-

Chart showing conversion rate dropping off as scripts increase

-

Now that we’ve covered why page size and complexity matter, let’s get into some juicy HTTP Archive stats so we can better understand the current state of the web and the impact of page bloat.

-

Analysis

-

Note: The statistics in this section are all based on the transfer size of a page and its resources. Not all resources on the web are compressed before sending, but if they are, this analysis uses the compressed size.

-

Page Weight

-

Roughly speaking, mobile sites are about 10% smaller than their desktop counterparts. The majority of the difference is due to mobile sites loading less image bytes than their desktop counterparts.

-

Mobile

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PercentileTotal (KB)HTML (KB)JS (KB)CSS (KB)Image (KB)Document (KB)
9062261071060234474649
75343156668122227025
501745263605689313
2580011164222667
103186655594
- -

Desktop

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PercentileTotal (KB)HTML (KB)JS (KB)CSS (KB)Image (KB)Document (KB)
9069451101131240522052
75377458721129243426
501934273916298314
2592412186263198
103976768784
- -

Page Weight Over Time

-

Over the past year the median size of a desktop site increased by 434KB; the median size of a mobile site increased by 179KB. Images are overwhelmingly driving this increase.

-

Mobile

-

Change (KB) in page size vs. 2018

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PercentileTotal (KB)HTML (KB)JS (KB)CSS (KB)Image (KB)Document (KB)
90+376-50+46+36+648+2
75+304-7+34+21+2810
50+179-1+27+10+1060
25+110-1+16+5+360
10+720+13+2+20+1
- -

Desktop

-

Change (KB) in page size vs. 2018

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PercentileTotal (KB)HTML (KB)JS (KB)CSS (KB)Image (KB)Document (KB)
90+1106-75+22+45+1291+5
75+795-12+9+32+686+1
50+434-1+10+15+3360
25+2370+12+7+1380
10+1200+10+2+39+1
- -

For a longer-term perspective on how page weight has changed over time, check out this graph on the main HTTP Archive site. Median page size has grown at a fairly constant rate since the HTTP Archive stated tracking this metric in November 2010 and the increase in page weight observed over the past year is consistent with this.

-

Page Requests

-

The median desktop site makes 74 requests; the median mobile site makes 69 requests. Images and JavaScript make up the majority of these requests. There was no significant change in the quantity or distribution of requests over the last year.

-

Mobile

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PercentileTotalHTMLJSCSSImageDocument
90168155220797
7511173212492
50693186280
2540293150
102214170
- -

Desktop

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PercentileTotalHTMLJSCSSImageDocument
90179145320906
7511873312542
50744196310
25442103160
102414170
- -

File Formats

-

The preceding analysis has focused on analyzing page weight through the lens of resource type. However, in the case of images and media, it’s possible to dive a level deeper and look at the differences in resource size between specific file formats.

-

File size by image format (Mobile)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PercentileGIFICOJPGPNGSVGWEBP
10003.080.370.252.54
250.030.267.961.140.434.89
500.041.12214.310.8813
750.062.7263222.4133
902.6513155907.9178
- +

Introduction

+

The median web page is around 1900KB in size and contains 74 requests. That doesn't sound too bad, right?

+

Here's the issue with medians: they mask problems. By definition, they focus only on the middle of the distribution. We need to consider percentiles at both extremes to get an understanding of the bigger picture.

+

Looking at the 90th percentile exposes the unpleasant stuff. Roughly 10% of the pages we're pushing at the unsuspecting public are in excess of 6 MB and contain 179 requests. This is, frankly, terrible. If this doesn't seem terrible to you, then you definitely need to read this chapter.

+

Myth: Page size doesn't matter

+

The common argument as to why page size doesn't matter anymore is that, thanks to high-speed internet and our souped-up devices, we can serve massive, complex (and massively complex) pages to the general population. This assumption works fine, as long as you're okay with ignoring the vast swathe of internet users who don't have access to said high-speed internet and souped-up devices.

+

Yes, you can build large robust pages that feel fast… to some users. But you should care about page bloat in terms of how it affects all your users, especially mobile-only users who deal with bandwidth constraints or data limits.

+ +

More bandwidth isn't a magic bullet for web performance

+

Even if more people had access to better devices and cheaper connections, that wouldn't be a complete solution. Double the bandwidth doesn't mean twice as fast. In fact, it has been demonstrated that increasing bandwidth by up to 1,233% only made pages 55% faster.

+

The problem is latency. Most of our networking protocols require a lot of round-trips, and each of those round trips imposes a latency penalty. For as long as latency continues to be a performance problem (which is to say, for the foreseeable future), the major performance culprit will continue to be that a typical web page today contains a hundred or so assets hosted on dozens of different servers. Many of these assets are unoptimized, unmeasured, unmonitored—and therefore unpredictable.

+

What types of assets does the HTTP Archive track, and how much do they matter?

+

Here's a quick glossary of the page composition metrics that the HTTP Archive tracks, and how much they matter in terms of performance and user experience:

+
    +
  • +

    The total size is the total weight in bytes of the page. It matters especially to mobile users who have limited and/or metered data.

    +
  • +
  • +

    HTML is typically the smallest resource on the page. Its performance risk is negligible.

    +
  • +
  • +

    Unoptimized images are often the greatest contributor to page bloat. Looking at the 90th percentile of the distribution of page weight, images account for a whopping 5.2 MB of a roughly 7 MB page. In other words, images comprise almost 75% of the total page weight. And if that already wasn't enough, the number of images on a page has been linked to lower conversion rates on retail sites. (More on that later.)

    +
  • +
  • +

    JavaScript matters. A page can have a relatively low JavaScript weight but still suffer from JavaScript-inflicted performance problems. Even a single 100 KB third-party script can wreak havoc with your page. The more scripts on your page, the greater the risk.

    +

    It's not enough to focus solely on blocking JavaScript. It's possible for your pages to contain zero blocking resources and still have less-than-optimal performance because of how your JavaScript is rendered. That's why it's so important to understand CPU usage on your pages, because JavaScript consumes more CPU than all other browser activities combined. While JavaScript blocks the CPU, the browser can't respond to user input. This creates what's commonly called "jank": that annoying feeling of jittery, unstable page rendering.

    +
  • +
  • +

    CSS is an incredible boon for modern web pages. It solves a myriad of design problems, from browser compatibility to design maintenance and updating. Without CSS, we wouldn't have great things like responsive design. But, like JavaScript, CSS doesn't have to be bulky to cause problems. Poorly executed stylesheets can create a host of performance problems, ranging from stylesheets taking too long to download and parse, to improperly placed stylesheets that block the rest of the page from rendering. And, similarly to JavaScript, more CSS files equals more potential trouble.

    +
  • +
+

Bigger, complex pages can be bad for your business

+

Let's assume you're not a heartless monster who doesn't care about your site's visitors. But if you are, you should know that serving bigger, more complex pages hurts you, too. That was one of the findings of a Google-led machine learning study that gathered over a million beacons' worth of real user data from retail sites.

+

There were three really important takeaways from this research:

+
    +
  1. +

    The total number of elements on a page was the greatest predictor of conversions. Hopefully this doesn't come as a huge surprise to you, given what we've just covered about the performance risks imposed by the various assets that make up a modern web page.

    +
  2. +
  3. +

    The number of images on a page was the second greatest predictor of conversions. Sessions in which users converted had 38% fewer images than in sessions that didn't convert.

    +
  4. +
+
+ + Chart showing 19 converted sessions vs. 31 non-converted sessions + +
Figure 1. Converted sessions vs non-converted sessions.
+
+
    +
  1. Sessions with more scripts were less likely to convert. What's really fascinating about this chart isn't just the sharp drop-off in conversion probability after about 240 scripts. It's the long tail that demonstrates how many retail sessions contained up to 1,440 scripts!
  2. +
+
+ + Chart showing conversion rate dropping off as scripts increase + +
Figure 2. Conversion rate dropping off as scripts increase.
+
+

Now that we've covered why page size and complexity matter, let's get into some juicy HTTP Archive stats so we can better understand the current state of the web and the impact of page bloat.

+

Analysis

+

The statistics in this section are all based on the transfer size of a page and its resources. Not all resources on the web are compressed before sending, but if they are, this analysis uses the compressed size.

+

Page weight

+

Roughly speaking, mobile sites are about 10% smaller than their desktop counterparts. The majority of the difference is due to mobile sites loading fewer image bytes than their desktop counterparts.

+

Mobile

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PercentileTotal (KB)HTML (KB)JS (KB)CSS (KB)Image (KB)Document (KB)
9062261071060234474649
75343156668122227025
501745263605689313
2580011164222667
103186655594
+ +
Figure 3. Page weight on mobile broken down by resource type.
+
+

Desktop

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PercentileTotal (KB)HTML (KB)JS (KB)CSS (KB)Image (KB)Document (KB)
9069451101131240522052
75377458721129243426
501934273916298314
2592412186263198
103976768784
+ +
Figure 4. Page weight on desktop broken down by resource type
+
+

Page weight over time

+

Over the past year the median size of a desktop site increased by 434 KB, and the median size of a mobile site increased by 179 KB. Images are overwhelmingly driving this increase.

+

Mobile

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PercentileTotal (KB)HTML (KB)JS (KB)CSS (KB)Image (KB)Document (KB)
90+376-50+46+36+648+2
75+304-7+34+21+2810
50+179-1+27+10+1060
25+110-1+16+5+360
10+720+13+2+20+1
+ +
Figure 5. Change in mobile page weight since 2018.
+
+

Desktop

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PercentileTotal (KB)HTML (KB)JS (KB)CSS (KB)Image (KB)Document (KB)
90+1106-75+22+45+1291+5
75+795-12+9+32+686+1
50+434-1+10+15+3360
25+2370+12+7+1380
10+1200+10+2+39+1
+ +
Figure 6. Change in desktop page weight since 2018.
+
+

For a longer-term perspective on how page weight has changed over time, check out this timeseries graph from HTTP Archive. Median page size has grown at a fairly constant rate since the HTTP Archive started tracking this metric in November 2010 and the increase in page weight observed over the past year is consistent with this.

+

Page requests

+

The median desktop page makes 74 requests, and the median mobile page makes 69. Images and JavaScript account for the majority of these requests. There was no significant change in the quantity or distribution of requests over the last year.

+

Mobile

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PercentileTotalHTMLJSCSSImageDocument
90168155220797
7511173212492
50693186280
2540293150
102214170
+ +
Figure 7. Mobile page requests broken down by resource type.
+
+

Desktop

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PercentileTotalHTMLJSCSSImageDocument
90179145320906
7511873312542
50744196310
25442103160
102414170
+ +
Figure 8. Desktop page requests broken down by resource type.
+
+

File formats

+

The preceding analysis has focused on analyzing page weight through the lens of resource types. However, in the case of images and media, it's possible to dive a level deeper and look at the differences in resource sizes between specific file formats.

+

File size by image format (mobile)

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PercentileGIF (KB)ICO (KB)JPG (KB)PNG (KB)SVG (KB)WEBP (KB)
10003.080.370.252.54
250.030.267.961.140.434.89
500.041.12214.310.8813
750.062.7263222.4133
902.6513155907.9178
+ +
Figure 9. Images file sizes on mobile broken down by image format.
+

Some of these results, particularly those for GIFs, are really surprising. If GIFs are so small, then why are they being replaced by formats like JPG, PNG, and WEBP?

-

The data above obscures the fact that the vast majority of GIFs on the web are actually tiny 1x1 pixels. These pixels are typically used as “tracking pixels”, but can also be used as a hack to generate various CSS effects. While these 1x1 pixels are images in the literal sense, the spirit of their usage is probably closer to what we’d associate with scripts or CSS.

+

The data above obscures the fact that the vast majority of GIFs on the web are actually tiny 1x1 pixels. These pixels are typically used as "tracking pixels", but can also be used as a hack to generate various CSS effects. While these 1x1 pixels are images in the literal sense, the spirit of their usage is probably closer to what we'd associate with scripts or CSS.

Further investigation into the data set revealed that 62% of GIFs are 43 bytes or smaller (43 bytes is the size of a transparent, 1x1 pixel GIF) and 84% of GIFs are 1 KB or smaller.

-

Chart showing cumulative distriubtion function of GIF file sizes

+
+ + Chart showing cumulative distriubtion function of GIF file sizes + +
Figure 10. Cumulative distriubtion function of GIF file sizes.
+

The tables below show two different approaches to removing these tiny images from the data set: the first one is based on images with a file size greater than 100 bytes, the second is based on images with a file size greater than 1024 bytes.

-

File size by image format; images > 100 bytes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PercentileGIFICOJPGPNGSVGWEBP
100.270.313.080.40.282.1
250.750.67.71.170.464.4
502.141.1220.474.350.9511.54
757.344.1961.1321.392.6731.21
903514.73155.4691.028.2676.43
- -

File size by image format; images > 1024 bytes only

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PercentileGIFICOJPGPNGSVGWEBP
101.281.123.41.51.23.08
251.91.128.212.881.525
504.012.4921.198.332.8112.52
7511.927.8762.5433.176.8832.83
9067.1522.13157.96127.1519.0679.53
- -

The low file size of PNG images compared to JPEG images may seem surprising. JPEG uses lossy compression (lossy compression results in data loss; this makes it possible to achieve smaller file sizes) while PNG uses lossless compression (lossless compression does not result in data loss; this produces higher-quality, but larger images). However this difference in file sizes is probably a reflection of the popularity of PNGs for iconography due to their transparency support; rather than differences in their encoding and compression.

-

File size by media format

-

MP4 is overwhelmingly the most popular media format on the web today. In terms of popularity, it is followed by WebM and MPEG-TS respectively.

-

Unlike some of the other tables in this data set, this one has mostly happy takeaways. Videos are consistently smaller on mobile - which is great to see. In addition, the median size of an MP4 video is a very reasonable 18 KB on mobile and 39 KB of desktop. The median numbers for WebM are even better but they should be taken with a grain of salt: the duplicate measurement of “0.29 KB” across multiple clients and percentiles is a little bit suspicious. One possible explanation is that identical copies of one very tiny WebM video is included on many pages. Of the three formats, MPEG-TS consistently has the highest file size across all percentiles; this may be related to the fact that it was released in 1995 - making it the oldest of these three media formats.

-

Mobile

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PercentileMP4 (KB)WebM (KB)MPEG-TS (KB)
100.890.290.01
252.070.2955
50181.44153
75202223278
90928390475
- -

Desktop

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PercentileMP4 (KB)WebM (KB)MPEG-TS (KB)
100.270.2934
251.050.29121
503917286
75514288476
902142896756
- +

File size by image format for images > 100 bytes

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PercentileGIF (KB)ICO (KB)JPG (KB)PNG (KB)SVG (KB)WEBP (KB)
100.270.313.080.40.282.1
250.750.67.71.170.464.4
502.141.1220.474.350.9511.54
757.344.1961.1321.392.6731.21
903514.73155.4691.028.2676.43
+ +
Figure 11. File size by image format for images > 100 bytes.
+
+

File size by image format for images > 1024 bytes

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PercentileGIF (KB)ICO (KB)JPG (KB)PNG (KB)SVG (KB)WEBP (KB)
101.281.123.41.51.23.08
251.91.128.212.881.525
504.012.4921.198.332.8112.52
7511.927.8762.5433.176.8832.83
9067.1522.13157.96127.1519.0679.53
+ +
Figure 12. File size by image format for images > 1024 bytes.
+
+

The low file size of PNG images compared to JPEG images may seem surprising. JPEG uses lossy compression. Lossy compression results in data loss, which makes it possible to achieve smaller file sizes. Meanwhile, PNG uses lossless compression. This does not result in data loss, which this produces higher-quality, but larger images. However, this difference in file sizes is probably a reflection of the popularity of PNGs for iconography due to their transparency support, rather than differences in their encoding and compression.

+

File size by media format

+

MP4 is overwhelmingly the most popular video format on the web today. In terms of popularity, it is followed by WebM and MPEG-TS respectively.

+

Unlike some of the other tables in this data set, this one has mostly happy takeaways. Videos are consistently smaller on mobile, which is great to see. In addition, the median size of an MP4 video is a very reasonable 18 KB on mobile and 39 KB on desktop. The median numbers for WebM are even better but they should be taken with a grain of salt: the duplicate measurement of 0.29 KB across multiple clients and percentiles is a little bit suspicious. One possible explanation is that identical copies of one very tiny WebM video is included on many pages. Of the three formats, MPEG-TS consistently has the highest file size across all percentiles. This may be related to the fact that it was released in 1995, making it the oldest of these three media formats.

+
Mobile
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PercentileMP4 (KB)WebM (KB)MPEG-TS (KB)
100.890.290.01
252.070.2955
50181.44153
75202223278
90928390475
+ +
Figure 13. Video size by media format on mobile.
+
+
Desktop
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PercentileMP4 (KB)WebM (KB)MPEG-TS (KB)
100.270.2934
251.050.29121
503917286
75514288476
902142896756
+ +
Figure 14. Video size by media format on desktop.
+

Conclusion

-

Over the past year, pages increased in size by roughly 10%. Brotli, performance budgets, and basic image optimization best practices are probably the three techniques that show the most promise for maintaining or improving page weight while also being widely applicable and fairly easy to implement. That being said, in recent years, improvements in page weight have been more constrained by the low adoption of best practices, than by the technology itself. In other words, although there are many existing techniques for improving page weight - they won’t make a difference if they aren’t put to use.

+

Over the past year, pages increased in size by roughly 10%. Brotli, performance budgets, and basic image optimization best practices are probably the three techniques which show the most promise for maintaining or improving page weight while also being widely applicable and fairly easy to implement. That being said, in recent years, improvements in page weight have been more constrained by the low adoption of best practices than by the technology itself. In other words, although there are many existing techniques for improving page weight, they won't make a difference if they aren't put to use.

{{ render_authors() }}