protoschool.github.io icon indicating copy to clipboard operation
protoschool.github.io copied to clipboard

Address WebKit's 7-day auto-deletion of LocalStorage

Open terichadbourne opened this issue 4 years ago • 4 comments

Starting a thread for us to decide how to approach this announcement, which I assume will destroy our caching abilities for people using Safari or using other browsers from iPads and iPhones: https://webkit.org/blog/10218/full-third-party-cookie-blocking-and-more/

We should check our Countly stats on device and browser usage before deciding how to address.

terichadbourne avatar Mar 25 '20 17:03 terichadbourne

I believe this touches the point of local storage not being persistent, before this new "rule", users could already delete their storage and browsers could even delete it when in need for storage space.

So I guess one of the long-term solutions that we should consider is to have permanent storage solution. The two main proposals right now are:

  • Web2 Server DB
  • IPFS with an identity service

One thing to note though, is that is it not a major priority right now to have data sync between devices since our mobile experience is not our focus, so that's why local storage has been a good fit for ProtoSchool.

zebateira avatar Sep 15 '20 14:09 zebateira

There might also be another option which is to ask the user for persistent storage permission: https://web.dev/persistent-storage/#request-persistent-storage

zebateira avatar Sep 22 '20 14:09 zebateira

Persistent Storage is also affected by this unless the user installed ProtoSchool as a PWA.

https://webkit.org/blog/10218/full-third-party-cookie-blocking-and-more/ A Note On Web Applications Added to the Home Screen

As mentioned, the seven-day cap on script-writable storage is gated on “after seven days of Safari use without user interaction on the site.” That is the case in Safari. Web applications added to the home screen are not part of Safari and thus have their own counter of days of use. Their days of use will match actual use of the web application which resets the timer. We do not expect the first-party in such a web application to have its website data deleted.

If your web application does experience website data deletion, please let us know since we would consider it a serious bug. It is not the intention of Intelligent Tracking Prevention to delete website data for first parties in web applications.

zebateira avatar Feb 11 '21 15:02 zebateira

So if we made ProtoSchool a PWA, this would be a nice solution to avoid data expiration. We'd need to suggest to users to install it after they finish a tutorial for example.

zebateira avatar Feb 11 '21 15:02 zebateira