Skip to content

Comment on Why IndexedDB is slow and what to use insteadparent

Comments

IndexedDB is also necessary for progressive web apps

localStorage doesn't work for progressive web apps?

It works the same way the glove compartment in your car works when driving for a holiday / to see relatives....

You grab stuff easily out of it, but not much'll stay in there.

Depends how complex your needs get, IMO. localStorage is a key/value store, IndexedDB is a (basic) database. (localStorage also ties up the main thread whenever its in use, which also becomes relevant if you're using it a ton)

Local storage is typically 5mb.

Not sure what PWA would survive on that.

I see, it has a lower quota and only IndexedDB has a mechanism to request persistence.

Thanks.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.