Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I’m a little confused by this and maybe I’m missing something. Wasn’t localStorage always intended to be treated as a volatile storage mechanism for non-critical data and caching? The advice I’ve seen for several years says to avoid storing sensitive or critical data there.

Can PWAs not switch to using IndexedDB which seems like it’s more purpose-built for this use case?

No snark intended. I’m legitimately curious what the situation is and where any blockers are.



In the original post from Apple[0] announcing these measures, they've listed all script-writable locations are subject to cache clearing:

- Indexed DB

- LocalStorage

- Media keys

- SessionStorage

- Service Worker registrations (I guess this means service worker caches)

[0]: https://webkit.org/blog/10218/full-third-party-cookie-blocki...


Thank you for outlining that! I missed the impact on Indexed DB in my original read of the issue. It makes more sense, now.


> Can PWAs not switch to using IndexedDB which seems like it’s more purpose-built for this use case?

IndexedDB is also subject to the 7 day limit. Leaving no persistent storage for web apps at all.


Ah, I missed that in the original documentation and most of the discussion I've seen has been around localStorage. Thank you!


It's a bit confusing because there are two similar terms being used to describe this. First is "local storage" which refers to any of the storage, as long as it's on the local device. Second (which you used) is "localStorage", which refers to specifically the window.localStorage API (which you are right about, has been described as a volatile short-term memory for apps).




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: