The potential energy savings of deprecating Cloudflare's __cfduid cookie.

How much data transfer and energy is saved by removing one of the web's most prevalent cookies?

The potential energy savings of deprecating Cloudflare's __cfduid cookie.

On 10 May 2021, Cloudflare quietly deprecated their __cfduid cookie. If your site uses Cloudflare, you now have one less cookie in your cookie list. Not only is this good for privacy concerns, but it's also good for energy consumption.

I'm going to do some rough back-of-the-napkin math to see what this means for the web from an energy perspective. Cloudflare provides DNS and a CDN that is used by roughly 81.7% of all websites.

The cookie they removed looked like this:


It's just 52 characters (52 bytes), but it was attached to all requests to help them detect bots and mitigate DDOS attacks on your website.

Simple math

Cloudflare claim to serve 25 million HTTP requests per second on average. That's 2 trillion, 160 billion requests per day.

  2,160,000,000,000 × 52 bytes
= 112,320,000,000,000 bytes

That's around 96 tonnes of CO2 per day[1] or 35,040 tonnes per year, just by removing a small 52 byte cookie.

So of the 1.5 billion tonnes of global CO2 emitted into the atmosphere from the internet each year, we're looking at a saving of 0.000023%.

It looks tiny, but it is significant. This is the same as driving 7,620 cars for a year.

Calculating CO2 emissions is very difficult, and figures like these can never be entirely accurate due to complexities such as renewable energy usage, network location, time and varying efficiency of client devices - along with the intricacies of browser caching.

The hard fact we do know is that removing such a prevalent cookie from the web will reduce CO2 emissions, and small efficiencies are always welcome.

[1] CO2 calculation:
1.805 kWh/GB
475 gCO2/kWh