简体   繁体   中英

Getting Security Error on iPhone when using localStorage

When I try saving anything with localStorage.setItem(""); in IOS Safari, I get this error -

SecurityError (DOM Exception 18): The operation is insecure.

Here is a screenshot of the error...

在此处输入图片说明

Any ideas how to fix this? Thanks.

I had this problem on the desktop version of Safari. I enabled "Disable Local File Restrictions" This is how you can find it:

在桌面野生动物园中找到“禁用本地文件限制”的位置

Your cookie settings are also not allowed to be on "Always block". Otherwise you also get this error!

Found the answer. Block Cookies was turned on in the users Safari Settings.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM