[{"data":1,"prerenderedAt":256},["ShallowReactive",2],{"page-the-deprecated-cookie":3,"navigation":166},{"id":4,"title":5,"body":6,"date":152,"description":153,"draft":154,"extension":155,"hideYear":154,"meta":156,"navigation":161,"path":162,"readingTime":147,"seo":163,"stem":164,"__hash__":165},"articles/articles/the-deprecated-cookie.md","The potential energy savings of deprecating Cloudflare's cfduid cookie.",{"type":7,"value":8,"toc":146},"minimark",[9,22,31,34,45,48,53,56,62,70,84,87,94,97,100,103,108],[10,11,12,13,21],"p",{},"On 10 May 2021, Cloudflare quietly ",[14,15,20],"a",{"href":16,"rel":17,"target":19},"https://blog.cloudflare.com/deprecating-cfduid-cookie",[18],"nofollow","_blank","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.",[10,23,24,25,30],{},"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 ",[14,26,29],{"href":27,"rel":28,"target":19},"https://w3techs.com/technologies/details/cn-cloudflare",[18],"81.7%"," of all websites.",[10,32,33],{},"The cookie they removed looked like this:",[35,36,41],"pre",{"className":37,"code":39,"language":40},[38],"language-text","__cfduid=dc20c450b83528481ae4486434e00e83d1615462565 \n","text",[42,43,39],"code",{"__ignoreMap":44},"",[10,46,47],{},"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.",[49,50,52],"h3",{"id":51},"simple-math","Simple math",[10,54,55],{},"Cloudflare claim to serve 25 million HTTP requests per second on average. That's 2 trillion, 160 billion requests per day.",[35,57,60],{"className":58,"code":59,"language":40},[38],"2,160,000,000,000 × 52 bytes\n= 112,320,000,000,000 bytes\n",[42,61,59],{"__ignoreMap":44},[10,63,64,65,69],{},"Removing the cookie saves roughly ",[66,67,68],"strong",{},"112.3 TB"," of data transfer per day.",[10,71,72,73,83],{},"That's around 96 tonnes of CO2 per day ",[74,75,76],"sup",{},[14,77,82],{"href":78,"ariaDescribedBy":79,"dataFootnoteRef":44,"id":81},"#user-content-fn-1",[80],"footnote-label","user-content-fnref-1","1"," or 35,040 tonnes per year, just by removing a small 52 byte cookie.",[10,85,86],{},"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%.",[10,88,89,90,93],{},"It looks tiny, but it is significant. This is the same as driving ",[66,91,92],{},"7,620 cars for a year",".",[10,95,96],{},"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.",[10,98,99],{},"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.",[101,102],"hr",{},[10,104,105],{},[66,106,107],{},"Footnotes:",[109,110,113,119],"section",{"className":111,"dataFootnotes":44},[112],"footnotes",[114,115,118],"h2",{"className":116,"id":80},[117],"sr-only","Footnotes",[120,121,122],"ol",{},[123,124,126,127,132,133,138,139],"li",{"id":125},"user-content-fn-1","CO2 calculation: 1.805 kWh/GB ",[14,128,131],{"href":129,"rel":130,"target":19},"https://www.mdpi.com/2078-1547/6/1/117",[18],"On Global Electricity Usage of Communication Technology: Trends to 2030"," 475 gCO2/kWh ",[14,134,137],{"href":135,"rel":136,"target":19},"https://www.iea.org/reports/global-energy-co2-status-report-2019/emissions#abstract",[18],"Global Energy & CO2 Status Report 2019"," ",[14,140,145],{"href":141,"ariaLabel":142,"className":143,"dataFootnoteBackref":44},"#user-content-fnref-1","Back to reference 1",[144],"data-footnote-backref","↩",{"title":44,"searchDepth":147,"depth":147,"links":148},2,[149,151],{"id":51,"depth":150,"text":52},3,{"id":80,"depth":147,"text":118},"2021-05-11","How removing a tiny cookie can have a big impact on carbon emissions.",false,"md",{"tags":157},[158,159,160],"cookies","energy","carbon",true,"/articles/the-deprecated-cookie",{"title":5,"description":153},"articles/the-deprecated-cookie","LxuASGvYTojlkVnNSf5FETax5qe5KV3uVdmjPoqZ5Mw",[167],{"title":168,"path":169,"stem":170,"children":171,"page":154},"Articles","/articles","articles",[172,178,184,190,196,202,208,214,220,226,232,238,244,249,250],{"title":173,"path":174,"stem":175,"description":176,"date":177},"Still haven't found what you're looking for?","/articles/ai-search","articles/ai-search","AI-powered search is transforming web search.","2024-10-31",{"title":179,"path":180,"stem":181,"description":182,"date":183},"Big Emoji","/articles/big-emoji","articles/big-emoji","Building an app for my kids.","2024-06-23",{"title":185,"path":186,"stem":187,"description":188,"date":189},"It probably won’t be you","/articles/it-probably-wont-be-you","articles/it-probably-wont-be-you","An interactive exploration of our lottery instincts.","2024-06-11",{"title":191,"path":192,"stem":193,"description":194,"date":195},"My memory is shot","/articles/my-memory-is-shot","articles/my-memory-is-shot","Discovering the link between writing and memory.","2024-04-28",{"title":197,"path":198,"stem":199,"description":200,"date":201},"Quotes","/articles/quotes","articles/quotes","A collection of quotes I've heard and written down at some point in my life.","2024-03-29",{"title":203,"path":204,"stem":205,"description":206,"date":207},"TikTok goes your clock","/articles/tiktok-goes-your-clock","articles/tiktok-goes-your-clock","What I learned from quitting TikTok","2024-03-26",{"title":209,"path":210,"stem":211,"description":212,"date":213},"User testing fail","/articles/user-testing-fail","articles/user-testing-fail","Attempting to think like a kid when designing a kids app.","2024-03-20",{"title":215,"path":216,"stem":217,"description":218,"date":219},"George Harrison's hands","/articles/george-harrisons-hands","articles/george-harrisons-hands","You can replicate the setup, but not the experience.","2023-01-17",{"title":221,"path":222,"stem":223,"description":224,"date":225},"Things I learned in 2022","/articles/things-i-learned-in-2022","articles/things-i-learned-in-2022","Aside from all the emergence of AI.","2022-12-20",{"title":227,"path":228,"stem":229,"description":230,"date":231},"Counting unique visitors without using cookies, UIDs or fingerprinting.","/articles/cookieless-unique-visitor-counts","articles/cookieless-unique-visitor-counts","on withcabin.com","2022-11-30",{"title":233,"path":234,"stem":235,"description":236,"date":237},"Hang up.","/articles/hang-up","articles/hang-up","Steps for for avoiding scam calls.","2022-05-06",{"title":239,"path":240,"stem":241,"description":242,"date":243},"The “yes” transaction","/articles/yes","articles/yes","Why my contact lens service is my favourite transaction.","2022-01-04",{"title":245,"path":246,"stem":247,"description":248,"date":152},"One line of code","/articles/one-line-of-code","articles/one-line-of-code","How I built an API for the London 2012 Olympics with one line of code.",{"title":5,"path":162,"stem":164,"description":153,"date":152},{"title":251,"path":252,"stem":253,"description":254,"date":255},"Never launching","/articles/never-launching-products","articles/never-launching-products","It's not just about the launch, it's about the process.","2021-04-09",1772188378088]