logoalt Hacker News

pier25yesterday at 8:23 PM2 repliesview on HN

> There's guaranteed persistence

There's not. Browsers can delete "persistent" storage at any time.

https://developer.mozilla.org/en-US/docs/Web/API/Storage_API...


Replies

12_throw_awayyesterday at 8:27 PM

It depends. From the link:

> If, for any reason, developers need persistent storage [...] they can do so by using the navigator.storage.persist() method of the Storage API.

This makes a request for guaranteed permanent storage ... which can be approved (or denied) by the user or by browser defaults.

ifwintercoyesterday at 8:51 PM

Edge case but playing devil’s advocate: a user can also uninstall the native app at any time, and might still expect their last change before they closed the app to be reflected in the web version.

You can never truly trust anything about a client because by definition you don’t control it

show 1 reply