0

I need to read locally stored data served by a web app and I've been trying to understand how indexedDB works and I find it hostile for starters and a bit messy (I'm kind of new in webdev). So I've discovered a workaroud that works perfectly: store a json DB in the cache, and access it using fetch. I still don't know if it is posible to write in the local json, but it is not a problem because now I only need to read data.

But I expect be some kind of subtle limitation here, because of the recurrent promotion of indexedDB. So... if I only need to read information: why should I use indexedDB instead of a cached DB in the form of a json file? What is the subtle technical detail that I am missing here?

Many thanks in advance!

1 Answers1

0

If your json data is lite and not heavy you can using cache and cache is faster and easier. But if your data had detail and heavy and a lot of fields you have to use indexed db that can be faster and easier and give you ability to query all part of data.

sajadab
  • 383
  • 2
  • 11