Comment on Why IndexedDB is slow and what to use insteadparentComments−remram4yIndexedDB is also necessary for progressive web appslocalStorage doesn't work for progressive web apps?−tehbeard4yIt 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.−afavour4yDepends 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)−cyanydeez4yLocal storage is typically 5mb.Not sure what PWA would survive on that.−remram4yI see, it has a lower quota and only IndexedDB has a mechanism to request persistence.Thanks.
Comments
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.