We can get an idea by analyzing main thread processing times for V8 at different percentiles:
At every percentile, processing times are longer for mobile web pages than on desktop. The median total main thread time on desktop is 849 ms, while mobile is at a larger number: 2,436 ms.
Number of requests
At the median, 19 requests are sent for desktop and 18 for mobile.
First-party vs. third-party
For both mobile and desktop clients, more third-party requests are sent than first-party at every percentile. If this seems surprising, let's find out how much actual code shipped comes from third-party vendors.
At the median, 89% more third-party code is used than first-party code authored by the developer for both mobile and desktop. This clearly shows that third-party code can be one of the biggest contributors to bloat.
In the context of browser-server interactions, resource compression refers to code that has been modified using a data compression algorithm. Resources can be compressed statically ahead of time or on-the-fly as they are requested by the browser, and for either approach the transferred resource size is significantly reduced which improves page performance.
There are multiple text-compression algorithms, but only two are mostly used for the compression (and decompression) of HTTP network requests:
- Gzip (gzip): The most widely used compression format for server and client interactions
- Brotli (br): A newer compression algorithm aiming to further improve compression ratios. 90% of browsers support Brotli encoding.
For a deeper analysis on compression, refer to the "Compression" chapter.
Open source libraries and frameworks
There are a number of possible reasons:
- WordPress, which is used in more than 30% of sites, includes jQuery by default.
- Switching from jQuery to a newer client-side library can take time depending on how large an application is, and many sites may consist of jQuery in addition to newer client-side libraries.
Frameworks and UI libraries
How many sites use these types of frameworks?
Only a subset of popular frameworks are being analyzed here, but it's important to note that all of them either follow one of these two approaches:
- A model-view-controller (or model-view-viewmodel) architecture
- A component-based architecture
Although there has been a shift towards a component-based model, many older frameworks that follow the MVC paradigm (AngularJS, Backbone.js, Ember) are still being used in thousands of pages. However, React, Vue and Angular are the most popular component-based frameworks (Zone.js is a package that is now part of Angular core).
Although this analysis is interesting, it's important to keep in mind that these results rely on a third-party detection library - Wappalyzer. All these usage numbers depend on the accuracy of each detection mechanism in place.
To declare a script as a module, the script tag must get the
<script type="module" src="main.mjs"></script>
How many sites use
type="module" for scripts on their page?
Browser-level support for modules is still relatively new, and the numbers here show that very few sites currently use
type="module" for their scripts. Many sites are still relying on module loaders (2.37% of all desktop sites use RequireJS for example) and bundlers (webpack for example) to define modules within their codebase.
If native modules are used, it's important to ensure that an appropriate fallback script is used for browsers that do not yet support modules. This can be done by including an additional script with a
<script nomodule src="fallback.js"></script>
When used together, browsers that support modules will completely ignore any scripts containing the
nomodule attribute. On the other hand, browsers that do not yet support modules will not download any scripts with
type="module". Since they do not recognize
nomodule either, they will download scripts with the attribute normally. Using this approach can allow developers to send modern code to modern browsers for faster page loads.
So, how many sites use
nomodule for scripts on their page?
Similarly, very few sites (0.50%-0.80%) use the
nomodule attribute for any scripts.
Preload and prefetch
Preload and prefetch are directives which enable you to aid the browser in determining what resources need to be downloaded.
- Preloading a resource with
<link rel="prefetch">tells the browser to take advantage of any idle time it has to fetch these resources needed for future navigations
So, how many sites use preload and prefetch directives?
For all sites measured in HTTP Archive, 14.33% of desktop sites and 14.84% of mobile sites use
<link rel="preload"> for scripts on their page.
For both mobile and desktop, 0.08% of pages leverage prefetch for any of their scripts.
With HTTP Archive, we can take a look at any newer API that is supported (or is about to be) and see how widespread its usage is. These APIs may already be used in browsers that support them or with an accompanying polyfill to make sure they still work for every user.
How many sites use the following APIs?
Atomics (0.38%) and SharedArrayBuffer (0.20%) are barely visible on this chart since they are used on such few pages.
It is important to note that the numbers here are approximations and they do not leverage UseCounter to measure feature usage.
Although useful, there are a number of reasons why many sites may not want to include source maps in their final production site, such as choosing not to expose complete source code to the public. So how many sites actually include sourcemaps?
For both desktop and mobile pages, the results are about the same. 17-18% include a source map for at least one script on the page (detected as a first-party script with