Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.9k 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 Answer

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...