DEV Community

Cover image for Reducing Carbon Footprint through Web Vitals Optimisation
Dimitris Kiriakakis
Dimitris Kiriakakis

Posted on

Reducing Carbon Footprint through Web Vitals Optimisation

Nowadays the environmental impact of online activities such as accessing a website or an application, is becoming significant, however it's often overlooked. This blog post demonstrates how measuring and reducing the carbon footprint of websites by optimising them can lead to extraordinary results.

Measuring a Website's Carbon Footprint

The first step toward sustainability is understanding the environmental cost of a website. Tools like Website Carbon Calculator provide insights into the amount of CO2 generated per page view, offering a concrete metric to gauge and subsequently reduce a website's carbon output.

Our use case

In early 2022 we embarked on a journey to optimize the ZEAL websites and improve their web vitals scores. Back then, the carbon footprint for every page load at the most popular website was 1.13g of CO2 per page load.

Lotto24's carbon footprint in 2022

At first glance you might think that this is a tiny number but if we consider that this website has an average of ~22 million visits per year, this translates to 25 tonnes of CO2 emissions annually.

Our main motivation during that journey was to improve the experience of our users, but as it turns out, improvements in Web Vitals β€” the set of metrics that measure web performance β€” can significantly reduce a site's carbon footprint. For example, efficiently loading resources reduces the energy used by servers, networks, and devices. Furthermore, optimising image sizes and minimising JavaScript execution not only enhance page speed and improve the LCP (Largest Contentful Paint) metric but also decrease the energy consumed during data processing and transmission.

Fast forward in 2024, now we finally have websites that pass the Web Vitals and our carbon footprint is reduced to 0.39g of CO2 per page load.

Lotto24's carbon footprint in 2024

We still have a long way to go, but this already translates to an annual reduction of 16.28 tonnes of CO2..

..or in equivalents:

  • saving 58.8 tonnes of coal
  • saving 1,871 liters of gasoline
  • planting 739 trees

..EVERY YEAR.

Conclusion

Our optimisation journey is still ongoing. Nevertheless, by measuring our website’s carbon emissions and optimising Web Vitals, we've already achieved significant environmental results. We encourage all web developers and companies to assess their digital carbon footprint and strive for greener web vitals. Together, we can make a substantial impact not only to our website's user experience but also to our planet.

Top comments (0)