Hacker News new | ask | show | jobs
by grun 2801 days ago
Cookies are frequently cleared by users, and the other datastores -- IndexedDB, LocalStorage, and SessionStorage -- can be unceremoniously purged by the browser under storage pressure.

See my other comment, here: https://news.ycombinator.com/item?id=18297177

I'll explicate this in the documentation. Thank you for your feedback, bazizbaziz.

2 comments

Thanks for the response! FWIW I'm overall really interested in this, as I maintain an application that uses localStorage to keep very important data while the app is offline until it can be uploaded.

I recently tested localForage [0] to see if it could be more reliable and get around storage limitations of localStorage. Unfortunately, LocalForage has a very annoying problem where it picks a single storage backend to use, but the one it chooses can switch on page reloads (yes, even on the same device/browser.) and this switching causes data loss as keys stored in the other backends are unaccessible. I'm very interested to see if IronDB can help here! Thanks for working on this.

[0] https://github.com/localForage/localForage

Wonderful.

Don't hesitate to let me know if there's anything else I can help with, bazizbaziz.

What if users don't want you taking control of their computer?