ModusVert
Methodology

❓Picking the right framework for a lower carbon static website

Gordon Bazeley

Website Carbon

As a sustainability consultant I feel that I need to “walk the talk” and have the lowest possible carbon weight for my website.

If you haven’t heard the concept of a website carbon weight it’s simply the amount of carbon emitted each time someone visits your website.

There are many different factors impacting on carbon weight. In this post I’m going to focus in on one of them, JavaScript framework selection, and my journey to finding what I feel is the best framework currently available. As a reminder, JavaScript is the language used to build site functionality.

I should add the caveat that my website is a static content based website. The selection criteria are more complex for a dynamic site e.g. an eCommerce site so I won’t be discussing them in this post.

The good news is that emerging technologies are making it easier to reduce carbon weight. My journey involved three full website rebuilds plus assessments of probably a dozen more technologies.

I started my journey about two years ago by assessing a bunch of static site builders - these do a lot of the work around styling, making sites responsive so that display appropriately on different devices etc. From this I determined that eleventy was the best technology available - this gave me a carbon weight of 0.10g per homepage visit, in the top 90% of sites surveyed by websitecarbon.com.

I was happy enough with Eleventy for a while but felt that I could do better and reduce carbon further. That led me on to Docusaurus which allowed me to reduce the weight to 0.06g.

Recently I became aware of Astro which is optimised for minimal JS size and the current version of the site is down to 0.02g of carbon emitted by each page load. This is now in the top 2% of all websites according to websitecarbon.com. This site has a total payload of 103kb, which is smaller than a single image on many sites.

I’m happy with this for now but will continue to remain on the look out for ways to reduce the carbon weight further.

In a nutshell, if it’s been a couple of years or more since you last looked at your site it may be worth evaluating the latest technologies - these can reduce the carbon weight of your website as well as increasing its performance.

If you want help with determining the right framework for your business please get in touch.

← Back to Blog