[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"\u002Fblog\u002Ffix-cloudflare-storagetype-persistent-is-depracated":3,"$fiXx7YhLGmHq2rtwONMIBEGK8jjPK_tJ5fbypbh_xwVU":343,"i-local-icon:calendar-days":347,"i-local-icon:tag":352,"i-local-icon:eye":354},{"id":4,"title":5,"body":6,"categories_slug":330,"comment_count":333,"date_published":334,"description":335,"extension":336,"meta":337,"navigation":338,"path":339,"seo":340,"stem":341,"__hash__":342},"content\u002Fblog\u002F19.fix-cloudflare-storagetype-persistent-is-depracated.md","Fix Cloudflare 'StorageType.persistent is deprecated' Error in Google Lighthouse",{"type":7,"value":8,"toc":316},"minimark",[9,13,18,23,27,33,74,77,86,91,102,107,128,132,158,162,166,193,196,203,207,210,229,236,242,246,249,257,264,268,274,279,293,298,312],[10,11,5],"h1",{"id":12},"fix-cloudflare-storagetypepersistent-is-deprecated-error-in-google-lighthouse",[14,15],"meta-card",{":categories":16,":date":17},"categories_slug","date_published",[19,20,22],"h2",{"id":21},"overview","Overview",[24,25,26],"p",{},"When running Google Lighthouse audits on your website, you may encounter a Best Practices warning that significantly impacts your score:",[24,28,29],{},[30,31,32],"strong",{},"Error Message:",[34,35,40],"pre",{"className":36,"code":37,"language":38,"meta":39,"style":39},"language-bash shiki shiki-themes github-dark","'StorageType.persistent' is deprecated. Please use standardized 'navigator.storage' instead\n","bash","",[41,42,43],"code",{"__ignoreMap":39},[44,45,48,52,56,59,62,65,68,71],"span",{"class":46,"line":47},"line",1,[44,49,51],{"class":50},"svObZ","'StorageType.persistent'",[44,53,55],{"class":54},"sU2Wk"," is",[44,57,58],{"class":54}," deprecated.",[44,60,61],{"class":54}," Please",[44,63,64],{"class":54}," use",[44,66,67],{"class":54}," standardized",[44,69,70],{"class":54}," 'navigator.storage'",[44,72,73],{"class":54}," instead\n",[24,75,76],{},"This error originates from Cloudflare's Bot Management JavaScript and can reduce your Lighthouse Best Practices score. The issue stems from Cloudflare using outdated Web API methods in their bot detection scripts.",[24,78,79],{},[80,81],"img",{"alt":82,"className":83,"src":85},"Lighthouse Error Image 1",[84],"blog-image","\u002Fimages\u002Fblog\u002Flighthouse-error\u002Flighthouse-error-1.webp",[87,88,90],"h3",{"id":89},"why-this-happens","Why This Happens",[24,92,93,94,97,98,101],{},"Cloudflare's Bot Management feature injects JavaScript code that uses the deprecated ",[41,95,96],{},"StorageType.persistent"," API instead of the modern ",[41,99,100],{},"navigator.storage.persist()"," method. This has been a persistent issue for several years, with Cloudflare being slow to update their implementation.",[24,103,104],{},[30,105,106],{},"Community Discussion:",[108,109,110,121],"ul",{},[111,112,113],"li",{},[114,115,120],"a",{":target":116,"href":117,"rel":118},"\\_blank","https:\u002F\u002Fcommunity.cloudflare.com\u002Ft\u002Fstoragetype-persistent-is-deprecated-main-js\u002F655540",[119],"nofollow","Cloudflare Community Thread 1",[111,122,123],{},[114,124,127],{":target":116,"href":125,"rel":126},"https:\u002F\u002Fcommunity.cloudflare.com\u002Ft\u002Fremove-usage-of-deprecated-api\u002F609675",[119],"Cloudflare Community Thread 2",[87,129,131],{"id":130},"impact-on-your-website","Impact on Your Website",[108,133,134,140,146,152],{},[111,135,136,139],{},[30,137,138],{},"Lower Lighthouse scores"," - Affects Best Practices rating",[111,141,142,145],{},[30,143,144],{},"Console warnings"," - Clutters browser developer console",[111,147,148,151],{},[30,149,150],{},"Future compatibility"," - May break when browsers remove deprecated APIs",[111,153,154,157],{},[30,155,156],{},"SEO implications"," - Google considers Core Web Vitals and Lighthouse scores for ranking",[19,159,161],{"id":160},"solution-disable-javascript-detections","Solution: Disable JavaScript Detections",[87,163,165],{"id":164},"step-1-access-cloudflare-dashboard","Step 1: Access Cloudflare Dashboard",[167,168,169,177,180],"ol",{},[111,170,171,172],{},"Log in to your ",[114,173,176],{":target":116,"href":174,"rel":175},"https:\u002F\u002Fdash.cloudflare.com\u002F",[119],"Cloudflare dashboard",[111,178,179],{},"Select the domain experiencing the issue",[111,181,182,183,186,187,186,190],{},"Navigate to ",[30,184,185],{},"Security"," → ",[30,188,189],{},"Settings",[30,191,192],{},"Bot traffic",[24,194,195],{},"You should see the Bot Management configuration panel:",[24,197,198],{},[80,199],{"alt":200,"className":201,"src":202},"Cloudflare Bot Management Settings",[84],"\u002Fimages\u002Fblog\u002Flighthouse-error\u002Flighthouse-error-2.webp",[87,204,206],{"id":205},"step-2-disable-javascript-detections","Step 2: Disable JavaScript Detections",[24,208,209],{},"In the Bot Management settings:",[167,211,212,219,226],{},[111,213,214,215,218],{},"Locate the ",[30,216,217],{},"JavaScript Detections"," option in the right-hand column as shown below",[111,220,221,222,225],{},"Toggle the switch to ",[30,223,224],{},"OFF"," (disabled)",[111,227,228],{},"The change will be applied automatically",[24,230,231],{},[80,232],{"alt":233,"className":234,"src":235},"Disable JavaScript Detections",[84],"\u002Fimages\u002Fblog\u002Flighthouse-error\u002Flighthouse-error-3.webp",[24,237,238,241],{},[30,239,240],{},"Important:"," This setting may take a few minutes to propagate across Cloudflare's global network.",[87,243,245],{"id":244},"step-3-verify-the-fix","Step 3: Verify the Fix",[24,247,248],{},"After disabling JavaScript Detections:",[167,250,251,254],{},[111,252,253],{},"Run a new Lighthouse audit",[111,255,256],{},"Check that the StorageType.persistent error is resolved",[24,258,259],{},[80,260],{"alt":261,"className":262,"src":263},"Lighthouse Fixed Result",[84],"\u002Fimages\u002Fblog\u002Flighthouse-error\u002Flighthouse-error-4.webp",[19,265,267],{"id":266},"conclusion","Conclusion",[24,269,270,271,273],{},"Disabling Cloudflare's JavaScript Detections is an effective solution for the ",[41,272,96],{}," deprecation warning. However, keep in mind the following benefits\u002Fconsiderations:",[24,275,276],{},[30,277,278],{},"Benefits:",[108,280,281,284,287,290],{},[111,282,283],{},"Eliminates Lighthouse Best Practices warnings",[111,285,286],{},"Improves page performance slightly",[111,288,289],{},"Removes deprecated API console errors",[111,291,292],{},"Better Core Web Vitals scores",[24,294,295],{},[30,296,297],{},"Considerations:",[108,299,300,303,306,309],{},[111,301,302],{},"Slightly reduced bot protection",[111,304,305],{},"Possible need for alternative security measures",[111,307,308],{},"Ongoing monitoring requirements",[111,310,311],{},"Potential impact on high-risk sites",[313,314,315],"style",{},"html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":39,"searchDepth":317,"depth":317,"links":318},2,[319,324,329],{"id":21,"depth":317,"text":22,"children":320},[321,323],{"id":89,"depth":322,"text":90},3,{"id":130,"depth":322,"text":131},{"id":160,"depth":317,"text":161,"children":325},[326,327,328],{"id":164,"depth":322,"text":165},{"id":205,"depth":322,"text":206},{"id":244,"depth":322,"text":245},{"id":266,"depth":317,"text":267},[331,332],"seo","development",null,"2025-06-21","Fix the Cloudflare 'StorageType.persistent is deprecated' error that causes Google Lighthouse to give low Best Practices scores. Complete step-by-step guide with screenshots and benefits\u002Fconsiderations.","md",{},true,"\u002Fblog\u002Ffix-cloudflare-storagetype-persistent-is-depracated",{"title":5,"description":335},"blog\u002F19.fix-cloudflare-storagetype-persistent-is-depracated","e5wWDGckD9A5QoEsuG08lyLi8RVNqeCm-0PkXsmFTlo",[344],{"id":345,"name":339,"count":346},32,2914,{"left":348,"top":348,"width":349,"height":349,"rotate":348,"vFlip":350,"hFlip":350,"body":351},0,24,false,"\u003Cpath\n    fill=\"none\"\n    stroke=\"currentColor\"\n    stroke-linecap=\"round\"\n    stroke-linejoin=\"round\"\n    stroke-width=\"1.5\"\n    d=\"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12zM12 15h.008v.008H12zm0 2.25h.008v.008H12zM9.75 15h.008v.008H9.75zm0 2.25h.008v.008H9.75zM7.5 15h.008v.008H7.5zm0 2.25h.008v.008H7.5zm6.75-4.5h.008v.008h-.008zm0 2.25h.008v.008h-.008zm0 2.25h.008v.008h-.008zm2.25-4.5h.008v.008H16.5zm0 2.25h.008v.008H16.5z\" \u002F>",{"left":348,"top":348,"width":349,"height":349,"rotate":348,"vFlip":350,"hFlip":350,"body":353},"\u003Cg\n    fill=\"none\"\n    stroke=\"currentColor\"\n    stroke-linecap=\"round\"\n    stroke-linejoin=\"round\"\n    stroke-width=\"1.5\">\n    \u003Cpath\n      d=\"M9.568 3H5.25A2.25 2.25 0 0 0 3 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.1 18.1 0 0 0 5.224-5.223c.54-.827.368-1.908-.33-2.607l-9.583-9.58A2.25 2.25 0 0 0 9.568 3\" \u002F>\n    \u003Cpath d=\"M6 6h.008v.008H6z\" \u002F>\n  \u003C\u002Fg>",{"left":348,"top":348,"width":349,"height":349,"rotate":348,"vFlip":350,"hFlip":350,"body":355},"\u003Cg\n    fill=\"none\"\n    stroke=\"currentColor\"\n    stroke-linecap=\"round\"\n    stroke-linejoin=\"round\"\n    stroke-width=\"1.5\">\n    \u003Cpath\n      d=\"M2.036 12.322a1 1 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178c.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178\" \u002F>\n    \u003Cpath d=\"M15 12a3 3 0 1 1-6 0a3 3 0 0 1 6 0\" \u002F>\n  \u003C\u002Fg>"]