My use case is that I needed to synchronize a product database. Basically, I get a really big set of data, that needs to work offline.
My first naive approach was inserting them one by one, basically replicating one row per product. But that didn't work, so I ended inserting them as "pages" then dealing with it in memory.
I'm not saying this works for every situation, but for me, it made such a big difference. The app feels really instant and that works really well :)
Wow, this is a great idea, I've never seen anyone do it before. honestly I'm still a bit surprised that it works π But wouldn't it be better to split your product's info into multiple tables? For example you could create a table that only has the product's name so you can run search queries on it and put a reference in it to other tables that have prices, brands, and other info... This could be easier to manage and also you're not gonna have to write all of the data to Indexeddb at once, you can just write the names that you need to display to the DB. and the rest of the info can be written to the DB in the background while the user browses through your app. If you have other opinions or better ways to do this please share with me your knowledge as I'm currently working on an app with almost the same requirements and it's my first time working with indexeddb π, Thanks again for the great article π.