Sustainable Web Development

Title Text


Simon MacDonald


  • Awareness
  • Best Practices
  • Metrics
  • Tools
  • Community

How much does the global Internet contribute to greenhouse gases?







We can’t recycle our way out of climate change

Report: Plastics, Oil Industry Deceived Public on Recycling Use for More Than 50 Years

Good News!

Everyone in this room has an outsized impact

How do you sell sustainable web development internally?


Look for ways to improve performance while reducing the amount of energy your site uses.



Countries are enshrining their climate goals into law. Consequently, in order to do business with these countries, you will need to show your commitment to sustainable practices.

Large sites like Amazon or Walmart have found that each 100ms delay on their sites leads to 1% less sales.

The 🇬🇧 Gov already requires this and 🇨🇦 Gov has published their strategy.


Some companies require ISO14001 certification in order to do business with them.


It's crass but branding works. Otherwise, manufacturers wouldn't slap a "lite" label on all those products in the grocery store. 

Having these environment certifications can give you a competitive advantage when landing deals.

Other studies show "eco friendly" goods are outperforming conventional ones 2 to 1 and have a price premium of 27%


  • Awareness
  • Best Practices
  • Metrics
  • Tools
  • Community

Use the right language

In programming, the rule of least power is a design principle that "suggests choosing the least powerful language suitable for a given purpose".

– W3C TAG Finding 23 Feb 2006



No Tracking

Resist 3rd Party Tracking Scripts

Tracking Alternatives

  • Server Side Analytics
  • Use a streamlined client side solution

Optimize Font Files

Cut Down on Image Sizes

  • Use vector images (SVG) over photographs when appropriate
  • Use a tool like ImageOptim to remove metadata and compress images
  • Use modern (smaller) image formats like webp
  • Set the "lazyload" attribute on images that are below the fold
  • Blur the edges of images to reduce file size
  • Use the srcset and sizes on the img element to deliver the right sized image to the user
<img src="image.jpg" 
     srcset="small.jpg 300w, medium.jpg 600w, large.jpg 900w"
     sizes="(max-width: 300px) 100vw, 
            (max-width: 600px) 50vw, 
            (max-width: 900px) 33vw, 900px"

Reduce JavaScript Usage

  • Stop using JavaScript for things HTML and CSS can do better.
  • Evaluate whether you really need a framework for your site or not.
  • Use dynamic imports
  • Compress your code (gzip/brotli) 

Cache Agressively

  • Fingerprint your files
  • Cache forever

Block the Bots

  • Bots are energy vampires
  • Use your providers Web Application Firewall (WAF)
  • And/or write your own robots.txt
# Allow all bots
User-agent: *

# Except ChatGPT and Bard
User-agent: GPTBot
Disallow: /

User-agent: Google-Extended
Disallow: /

A few words about colour

  • Organic Light Emitting Diode (OLED) screens
  • Black pixels use the least energy
  • White pixels use the most energy
  • A general rule of thumb is that darker colours use less energy
  • The caveat is blue uses more power than red or green


  • Awareness
  • Best Practices
  • Metrics
  • Tools
  • Community


Web Metrics

  • Largest Contentful Paint (LCP)
  • First Input Delay (FIP)
  • Cumulative Layout Shift (CLS)
  • Interaction to Next Paint (INP) 

Sustainable Web Metrics

  • Data Transfer
  • Carbon intensity of electricity

Estimating Data Transfer Emissions with Page Weight

Page Weight: the total number of kilobytes the first time someone visits a page.

Page Weight

2018-06-01 to 2024-01-01

Page Weight Budgets

  • Profile your site to create a benchmark for page weights
    • First visit
    • Subsequent visits
  • Benchmark your site against the industry leaders





Carbon intensity of electricity




Not are sources are equal




Intensity of electicity generation by region

Page Weight *

Energy Intensity =

Total amount of CO2


  • Awareness
  • Best Practices
  • Metrics
  • Tools
  • Community

Checking CO2 Emissions

Estimating CO2 Emissions

  • CO2.js works in browser and node.js

Electricity Generation by Region

Green Web Hosting

Browser Energy Usage

Safari Energy Impact Meter

Font Tools


  • Awareness
  • Best Practices
  • Metrics
  • Tools
  • Community


Artificial Intelligence & Cryptocurrencies


Copy of Sustainable Web Development

By Simon MacDonald

Copy of Sustainable Web Development

  • 69