Our site was fast. At least we thought so. Then we tested it on Website Carbon and got a B.
A B is not a bad grade. For an agency that sells fast websites, it is not good enough either. In three days we took our homepage from 1,237 KB to 135 KB and reached A+. Here is exactly what we changed and how much each change saved.
What Website Carbon Measures
Website Carbon estimates how much CO₂ is produced every time someone views a page. The calculation is based mainly on how much data the browser has to download, and on whether the server runs on renewable energy.
The scale is clear:
| Rating | CO₂ per view |
|---|---|
| A+ | up to 0.040 g |
| A | up to 0.079 g |
| B | up to 0.145 g |
| C | up to 0.209 g |
We were at 0.11 g. Our Cloudflare hosting was already green, so only one option was left: the page had to download less data. To reach A+, we had to cut the weight to roughly a third.
An important side effect: less data also means faster loading. In practice, carbon footprint and speed are the same problem.
The Starting Point: Where 1.2 MB Went
The first step was to measure what the homepage actually loads. We ran the browser with an empty cache and scrolled the page to the bottom.
The result surprised us. HTML and CSS together were only 34 KB. Everything else was stuff the visitor never sees directly:
- Project images: 872 KB. Three photos on the homepage weighed 387, 261 and 224 KB.
- Google Analytics: 195 KB. More than half of everything that loaded before the images.
- Animation library (GSAP): 46 KB.
- Font: 47 KB in two files.
Five Changes
1. Images: From 872 KB to 30 KB
The project photos were unoptimized JPGs. The ones on the homepage were 1,200 pixels wide, and some in the project galleries were as wide as 8,000. On the homepage they are shown in cards roughly 420 pixels wide.
Now Astro converts them to AVIF and WebP in several sizes on every build. The browser picks the smallest one that is still sharp on that screen. The three homepage images now weigh 30 KB combined, 96% less, with no visible difference in quality.
This was by far the biggest saving. The cost: builds now take about two minutes longer, because AVIF conversion is slow.
2. Google Analytics Only After Consent
The Google Analytics script used to load for every visitor, including those who declined cookies. Thanks to Consent Mode it did not record personal data, but 195 KB still went over the network.
Now the script only loads once the visitor clicks “Accept”. Anyone who declines downloads nothing. It is also cleaner from a GDPR point of view.
The trade-off: Google can no longer model anonymous data for visitors who decline. For us, that was an acceptable price.
3. Animations Without a Heavy Library
The animations on the site (content revealing on scroll, tilting cards, magnetic buttons) ran on GSAP. A great tool, but the site used only a small part of what it can do.
We wrote our own module that covers exactly the features the site needs, using what the browser already has built in. Compressed, it is 3.3 KB instead of 46 KB. The animations look the same.
4. A Font With Only the Letters We Use
The Outfit font loaded in two files totalling 47 KB, including characters for languages that never appear on the site.
We went through every page, collected every character that actually appears, and cut the font down to just those: the English alphabet, č, š, ž, ć, đ and punctuation. One file, 23 KB.
5. Favicon as SVG
A small thing, but it says a lot. The browser tab icon was an 8 KB .ico file. As a vector SVG it is 0.9 KB and sharp on every screen.
The Result
| Before | After | |
|---|---|---|
| Homepage weight | 1,237 KB | 135 KB |
| Images | 872 KB | 30 KB |
| JavaScript | 283 KB | 46 KB |
| Font | 47 KB | 23 KB |
| CO₂ per view | 0.11 g | 0.01 g |
| Cleaner than | 75% of pages | 98% of pages |
| Rating | B | A+ |
The page is 9 times lighter. At 10,000 views a month, by Website Carbon’s calculation, that is about 1.3 kg of CO₂ a year instead of 12.8 kg.
What This Means for SEO and Visitors
Let’s be honest: Google will not rank you higher because you have an A+. The badge in our footer is not a signal for search engines.
What the rating measures is, though. A lighter page loads faster, especially on a phone with a weak signal. Speed affects Core Web Vitals, and those affect rankings and whether a visitor waits or leaves.
For us the rating means one more thing. When we talk to clients about fast websites, we can point to our own.
How to Check Your Own Site
Test it on websitecarbon.com. The test is free and takes a few seconds. If you get a C or worse, there is almost certainly room for a big improvement.
Look at your image sizes. Open your browser’s developer tools, go to the Network tab and reload the page. If you see images of several hundred KB, that is your quickest win.
Count your third-party scripts. Analytics, chat widgets, ad pixels, social media plugins. Each one adds weight. Ask which ones you really need and whether they have to load before consent.
Check your fonts. Three or four fonts in several weights can easily go past 200 KB.
If you want to know how much your site could improve, get in touch. We will look at what your site loads and tell you which changes will make the biggest difference.