开发者

How to protect localStorage?

开发者 https://www.devze.com 2023-03-24 15:22 出处:网络
My understanding is that if you clear cache in a webkit browser then this will delete all localStorage entries.

My understanding is that if you clear cache in a webkit browser then this will delete all localStorage entries.

Is there any way to protect localStorage against user actions such as this? I'd like my app to be the only thing that can delete specific localStorage entries.

I'm target开发者_StackOverflowting webkit specifically - if I can't protect localStorage, what are my options (just need simple key-value pair storage.

Thanks


No, and if there is there shouldn't be. Putting data on the user's hard disk which the user cannot delete is an activity more commonly associated with malware. There have in the past been a number of class action lawsuits to do with cookies which were impossible to delete (see the last 3 paragraphs).

0

精彩评论

暂无评论...
验证码 换一张
取 消