Why web application size matters

Median page weight over time
Median page weight over time - Web Almanac 2022 - Page weight

Based on Web Almanac, the median page weight of websites increased 221% for desktop and 594% for mobile page loads between June 2012 and June 2022. In Web Almanac's report, in 2022 most of the page weight was contributed by images while the cost of JavaScript was roughly half of images. CSS and mobile contributed to size as well but in relatively minimal amounts. It is safe to say that the web is becoming more bloated each year. The question is, why does web application size matter and what can you do about it?

Most users access internet through mobile

Mobile internet traffic share
Mobile internet traffic share - Internet Traffic from Mobile Devices

It is not only the size of websites that is growing but the usage of the web as well. According to Josh Howarth's data from June 2024, 60% of global website traffic comes from mobile devices while 92.3% of internet users access it via their mobile phones. The global estimate for mobile usage alone is that there are 4.32 billion mobile users of which a large proportion (close to 70%) is from the African market.

As a developer using a fast broadband connection or better, it is easy to forget that most people occasionally use slow and potentially unreliable mobile connections. The theme of mobile usage ties back to size as it highlights the importance of designing your websites mobile friendly.

Web application size is a significant part of this given not only because of loading costs but in addition hardware related costs as it is well understood that big JavaScript payloads have their cost especially on mobile as shown by Tim Kadlec.

To simulate a slow connection easily, consider using throttling at Chrome DevTools.

Conversion increase
when improving the page loading time with 1s

+2%

Walmart technical deep dive into Web Performance

Slow sites lead to decreased user satisfaction on e-commerce

It is well understood that larger sites lead to decreased user satisfaction on e-commerce as discussed by Basalla et al. in "On Latency of E-Commerce Platforms".

In other words, by improving the latency of your e-commerce site, you will likely have more satisfied customers while generating better revenue. This realization is one of the reasons why particularly e-commerce focused companies invest on performance related work.

Abandonment decrease
when all Core Vitals thresholds are met

-24%

The Science Behind Web Vitals

Performant sites have better search visibility

Web application performance is a part of technical Search Engine Optimization (SEO) as explained by Eslamdoust in An overview of search engine optimization techniques.

The good thing is that unlike other SEO related factors, it is one of the easiest to optimize if you have the technical know-how.

How to address web application size?

Web application size can be addressed in multiple different ways at different levels. Often there are low-hanging fruits, such as image optimization (using WebP or deferring loading are good ideas for example), while other types of optimizations require larger refactoring.

The main question is to consider which data should be provided to the client and when. Many of the latest approaches, such as islands architecture or resumability, build on this observation.

In short, consider the following steps:

  1. Analyze the current situation using a service like Google's PageSpeed Insights, GTmetrix, or sitespeed.io. RelativeCI allows you to track the application size from inside out from the bundle perspective helping you to understand the composition of your application while avoiding regressions.
  2. Go through the proposed improvements
  3. Prioritize the work based on impact and complexity before adding it to the backlog
  4. Address the issues and repeat the process until you have reached a good spot

Once you have application size on your radar, it is a good idea to keep on monitoring from different angles to make sure you remain in a good spot. Some of the improvements will likely take a longer while to implement as not all performance work is easy but simultaneously your users will thank for it.

Conclusion

As mentioned early on, website and application size is a growing problem. The problem is compounded by the fact that an increasing amount of usage occurs on mobile and often in contexts where connection speed is limited.

You can set your application apart by acknowledging the issue and doing something about it. It is not only about the fact that it is a good thing to do but also about improving the visibility of your site as performance is a part of technical SEO while making your application faster and snappier to use.

Understand your application bundle size

RelativeCI - In-depth bundle analysis