💾 Archived View for sl1200.dystopic.world › art.inf › co2.gmi captured on 2023-05-24 at 18:30:03. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-12-03)

-=-=-=-=-=-=-

CO2 emissions on the web

02-2020 Danny van Kooten's

➡️ Artículo original

I’ve spent the last month trying to reduce the carbon footprint of the websites I have (some) control over. When talking about this with other people they often look at me blankly before asking “aren’t you taking this a little too far?”.

The simple answer is no. In fact, it is probably the most effective use of my time when it comes to reducing carbon dioxide emissions.

Just last week I reduced global emissions by an estimated 59.000 kg CO2 per month by removing a 20 kB JavaScript dependency in Mailchimp for WordPress. There’s no way I can have that kind of effect in other areas of my life.

CO2 emissions from distributed code

All of my WordPress plugins combined run on well over 2 million different websites, each website receiving who knows how many visitors.

At an average energy expenditure of 0,5 kWh per GB 1 of data transfer this means that every kB equals 0,5 kWh / 1.000.000 kB * 2.000.000 websites = 1 kWh if each of these websites received exactly 1 visitor.

Let’s assume the average website receives about 10.000 unique visitors per month and serves files from cache for returning visitors. The total amount of energy saved by shaving off a single kilobyte is then 1 kWh * 10.000 visitors = 10.000 kWh.

10.000 kWh of energy produced by the current European electricity grid equals about 10.000 * 0,295 = 2950 kg of CO2.

Shaving off a single kilobyte in a file that is being loaded on 2 million websites reduces CO2 emissions by an estimated 2950 kg per month.

To put this into perspective, that is the same amount of CO2 saved each month as:

I already work from home, am a vegetarian and didn’t take any flights in the last 3 years so it seems I am stuck trying to make the web more efficient.

What can we do?

According to httparchive.org, the average website on desktop is about 4 times as large as in 2010. On mobile, where data transfer is way more expensive in terms of energy usage, the numbers look even worse: from 200 kB up to a whopping 1,9 MB!

As web developers we have a responsibility to stop this madness. Did websites really get 4 times as good? Is this motherfuckingwebsite.com clocking in at 5 kB in total really that bad in comparison? I don’t think so.

Whenever you are adding to a website, ask yourself: is this necessary? If not, consider leaving it out.

Your content site probably doesn’t need JavaScript. You probably don’t need a CSS framework. You probably don’t need a custom font. Use responsive images. Extend your HTTP cache lifetimes. Use a static site generator or wp2static.com instead of dynamically generating each page on the fly, despite never changing. Consider ditching that third-party analytics service that you never look at anyway, especially if they also happen to sell ads. Run your website through websitecarbon.com. Choose a green web host.

I’m sorry if that turned into a bit of a rambling, but I hope you see where I am going with this.

Personally I constrained myself to not use more than 1 kB of CSS for the website you are reading this on. And I really liked making that work, it sparked creativity.

Let’s do our share as web developers and stop bloating the web.

https://httparchive.org/reports/page-weight?start=earliest&end=latest

https://motherfuckingwebsite.com/

https://github.com/you-dont-need/You-Dont-Need-Javascript

https://hacks.mozilla.org/2016/04/you-might-not-need-a-css-framework/

https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images

https://www.websitecarbon.com/

https://www.thegreenwebfoundation.org/

â—„â—„ BACK