Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.3k views
in Technique[技术] by (71.8m points)

google chrome - How long does localStorage persist for in 2021 given the updates around privacy concerns?

I did some quick googling and didn't find a straight answer here. I found a few sources saying that localStorage persists until a user requests their data to be deleted, however that was from a few years back.

In some WebKit documentation, I found:

Now ITP has aligned the remaining script-writable storage forms with the existing client-side cookie restriction, deleting all of a website’s script-writable storage after seven days of Safari use without user interaction on the site. These are the script-writable storage forms affected (excluding some legacy website data types):Indexed DB, , LocalStorage ,Media keys ,SessionStorage ,Service Worker registrations and cache

From this it sounds like localstorage will be cleared after 7 days if a user does not interact with the site again.

For context, I'm building a simple dry brining calculator. There is a button for a user to click which will store their calculation in localStorage so they can refer back to it later. Does all of this ITP stuff still apply to me in this use case? I am a first party that is not collecting any of this data, it is only stored on the user's device and accessed by the user.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

Just Browsing Browsing

[2] html - How to create even cell spacing within a

1.4m articles

1.4m replys

5 comments

57.0k users

...