Reducing my website carbon footprint

Reducing my website carbon footprint

for reducing website carbon usage

I ditched clunky, old React for Astro and increased my website carbon score from an F to an A+.

From Website Carbon Calculator:

Globally, the average web page produces approximately 0.8 grams CO2 equivalent per pageview. For a website with 10,000 monthly page views, that’s 102 kg CO2e per year.

This is what the calculator told me about my previous portfolio page:

  • Oh my, 1.41 g of CO2 is produced every time someone visits this web page
  • Over a year, with 10,000 monthly page views, eleni.codes produces 169.41kg of CO2 equivalent or 442 kWh of energy
  • As much C02 as 36,841 full charges of an average smartphone
  • This web page emits the amount of carbon that 8 trees absorb in a year
  • That’s enough electricity to drive an electric car 2,829km

I learned React in the height of its era, when you were either building front ends with React or not at all. It provided a more intuitive and flexible way to create applications vs HTML and vanilla javascript, and helped me to build a lot of fun things. But like all things created by Big Tech companies, regardless of what they open source, I always would rather another option. Astro kept coming up for me, whether on a podcast or when filling out the last State of Javascript survey, so I decided to work with it for my portolio project update. I loved to learn about the islands architecture, and learning that there are people out there coming up with new ways of doing things. Everything doesn’t have to be React 🙌🏼.