Orbit-db: Webkit local storage will no longer store data for more than seven days.

Created on 25 Mar 2020  路  9Comments  路  Source: orbitdb/orbit-db

This sounds like a real problem for orbitdb in the browser :(

https://webkit.org/blog/10218/full-third-party-cookie-blocking-and-more/

WebKit blog post announced changes to WebKit that erases all local storage data for a given site if the site is not used for seven days. Basically, you go on a vacation and the data is lost. This means that apps must necessarily keep the data on a server, or they risk losing it all because Apple thinks this equates to privacy.

https://andregarzia.com/2020/03/private-client-side-only-pwas-are-hard-but-now-apple-made-them-impossible.html

All 9 comments

Yes, we're aware of this and it is indeed very bad news. Looking at @gruns and immortaldb here, perhaps?

https://github.com/gruns/ImmortalDB

The rock doesn't block a river, the water just flows around it as they say

Also this is interesting: https://news.ycombinator.com/item?id=22687949

It's fairly ambiguous what this means, but to be fair we've known about this issue for over a year now and people are still using OrbitDB successfully. So we'll see.

Tragically, at first glance, ImmortalDB can't solve this. All the data
stores ImmortalDB uses to achieve redundancy -- IndexedDB, Cookies,
LocalStorage, etc -- are unceremoniously purged.

I'm honestly nonplussed at Apple/Safari's diktat here.

The rock doesn't block a river, the water just flows around it as they
say

Hopefully. Where there's a will, there's a way.

It seems there are exemptions for websites installed on the home screen but they're very ambiguous about what "7 days" means.

maybe persistent storage https://developer.mozilla.org/en-US/docs/Web/API/StorageManager/persist could also help but I don't know.

Unfortunately Safari doesn't implement navigator.storage, or in turn navigator.storage.persist().

Just booted up my Mac to confirm: https://i.gyazo.com/fe8344e2907d0a110c210d4fe9f53a4f.png.

In TallyLab for example we mitigate this by storing encrypted data on our server and restoring it when necessary. It's a shame we have to do that because of these draconian measures but it is what it is. Otherwise we can't support Safari users :/

It would be great if this resiliency were built into OrbitDB though, for sure.

Tragically, at first glance, ImmortalDB can't solve this. All the data
stores ImmortalDB uses to achieve redundancy -- IndexedDB, Cookies,
LocalStorage, etc -- are unceremoniously purged.

I prefer the deterministic nature of the existing data store - at least you know when the data will be gone. Anyone know if this a problem, or potential future problem, in other browsers?

It would be great if this resiliency were built into OrbitDB though, for sure.

Safari doesn't support the file system API, either. If their intention is to prevent websites and PWAs from having persistence, I would hazard that any other method or work around's days are also numbered.

I think that as you are doing @aphelionz, the only solution is to make the users' data safe to replicate for them.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

oskarpyke picture oskarpyke  路  6Comments

phillmac picture phillmac  路  4Comments

eusthace picture eusthace  路  6Comments

BartKnucle picture BartKnucle  路  4Comments

daviddias picture daviddias  路  6Comments