Hi there, I’m Mursleen!
I’m facing an issue with deprecated API. When I analyze my website on page speed insights it shows an error “StorageType.persistent
is deprecated. Please use standardized navigator.storage
instead”. This error slows down my website performance. Can you please assist me with that.?
Put a piece of electrical tape on your monitor to cover up the warning. I do the same thing with my check oil loght
. Works like a charm. It has zero impact on real world performance.
Here are the steps you can follow to fix this issue:
- Open your website code editor and locate the code that is using storage type. persistent.
- Replace it with the standardized navigator.storage API.
- Test your website again on Page Speed Insights to confirm that the issue has been resolved.
Yes dear I have found the storagetype.pereistent in my website source code, but there is no any code related to it. Page speed insights shows me the source file invisible.js where this code is deprecated. I also found the invisible.js file in my hosting file manager but there is no any invisible.js file. That’s why I’m unable to resolve this issue and asking the online Cloudflare community.
Cloudflare is using this invisible.js file. Page speed insights also shows this source file URL
/cdn-cgi/challenge-platform/h/b/scripts/alpha/invisible.js?ts=1681070400
I’m not sure this is something that needs to be addressed.
It’s very common for scripts that are intended to work across lots of browsers (especially older ones) to use deprecated APIs. Something like Bot Fight Mode has to support pretty dated browsers, so it’s likely this code is in place to work on these old browsers and are safely just ignored in modern ones.
Are you seeing any actual issues? Otherwise this Lighthouse warning is benign and safe to ignore. It will not slow down your site, at all.
Here’s confirmation from one of the engineers on that team:
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.