DEV Community

loading...

Discussion on: Make websites work offline - Offline Storage. Making IndexedDB the Hero!

Collapse
mahendrachoudhary profile image
mahendra choudhary

Thanks @saurabh . I think I found solution for one of my problem I always kept coming across at work . My project need to work with API which return a array of more than 4k objects, for now i am using localStorage but i think indexDB could be a better alternative .Definetly going to look it forward .

But can you give clearity on few points likes does index db support on all major browser.

Collapse
raymondcamden profile image
Raymond Camden

IDB would absolutely be a better use for storing a large amount of data. As you are storing an array in Local Storage, you have to serialize and deserialize the entire string in order to work with it. IDB doesn't require that.

As for support, it is VERY good: caniuse.com/#feat=indexeddb