3 ms·
This sounds like a possible solution to localStorage being cleared after 7 days of no user interaction on a site in Safari, though I'd guess this has some persi
by phillipseamore 5y ago
This sounds like a possible solution to localStorage being cleared after 7 days of no user interaction on a site in Safari, though I'd guess this has some persistence limitations as well.
- phillipseamore 5y agoDamn, "its storage lifetime is the same as other persistent storage types like IndexedDB and LocalStorage". So a maximum of 7 days if the users doesn't return to the site. Not very useful.
- ec109685 5y agoGross. Imagine going on vacation for a week and not using a particular website during that time, and losing all your data. Safari should have a big warning on top of that blog post saying, “all files will be deleted after 7 days unless these API’s are being used within a PWA”.
- ec109685 5y agoAlso, if this API behaves like Local Storage, it’s not backed up to iCloud either.
- jefftk 5y agoSafari's rules on storage persistence are aimed at limiting tracking. For it to be effective, they need to apply that limit to all forms of client side storage.
- phillipseamore 5y agoI understand that perspective but in reality it does way more damage to those of us who want to provide services that are specifically trying to protect privacy by not having user accounts or storing user data server-side - and our users. There is no way for me to safely store user data, for a site that most users interact with once or twice a month, without having to store that data server-side and requiring some way to authenticate them to retrieve it when the come back. If Safari provided an API to store data longer after a user prompt I would be more understanding. It seems many apps these days contact more trackers than a typical website[0]. And the apps manage to circumvent most of the counter measures despite Apple PR on privacy. [0] https://blog.lockdownprivacy.com/2021/09/22/study-effectiveness-of-apples-app-tracking-transparency.html https://blog.lockdownprivacy.com/2021/09/22/study-effectiven...
- jefftk 5y agoA prompt would make a lot of sense here. Perhaps as an extension of https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API https://developer.mozilla.org/en-US/docs/Web/API/Storage_Acc...
- phillipseamore 5y agoOr do it a bit like the engagement factor was for autoplay. A site gets an extended interval before clearing because it receives user interaction and the user spends X minutes on it. I'd actually be fine with sites that receive no user interaction or the user spends less than 1 minute on having immediate evacuation of storage when the user leaves.
- jefftk 5y agoI don't think gating on interaction does much of what they want, because they are trying to prevent cross-site tracking and it is quite common for people to interact with both sites. This is a mitigation that specifically addresses tracking that runs entirely on the client. If you set a cookie from the server the time limit does not apply, which means you can store whatever information you want on the server keyed by an HTTP cookie.