ProtoSchool / protoschool.github.io

The code that runs the ProtoSchool website. Visit https://proto.school for interactive tutorials on decentralized web protocols. Explore IPFS and Filecoin through code challenges, code-free lessons, and local events.
https://proto.school
Other
166 stars 67 forks source link

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

Open terichadbourne opened 4 years ago

terichadbourne commented 4 years ago

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.

zebateira commented 4 years ago

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:

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 commented 4 years ago

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 commented 3 years ago

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 commented 3 years ago

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.