Looking for interesting use-cases.
Ask HN: Have you made any use of IndexedDB?
1–5 of 5 posts
Re: Ask HN: Have you made any use of IndexedDB?
#2This website fetches the Johns Hopkins University COVID-19 data from GitHub (in CSV files), and fetching this every single user action is not feasible.
When a user first enters the website, this data is fetched from GitHub, parsed and formatted, and stored in IndexedDB (until it's deemed "stale").
I first used Local Storage, but I needed more space than most browsers allow on Local Storage, so I moved to IndexedDB.
By the way, the API of IndexedDB is somewhat awkward, but there are great libraries like IDB (https://github.com/jakearchibald/idb) that make it much more developer-friendly.
Re: Ask HN: Have you made any use of IndexedDB?
#3It's a nice idea, and it's pretty magical to be able to build an interactive website that can work fully offline. That said, there are some pitfalls you have to watch out for, e.g. database connection contention if you have multiple tabs to the same origin open.
The lack of great tooling around indexeddb is also a bummer. Something like TablePlus but for indexeddb would be great.
Re: Ask HN: Have you made any use of IndexedDB?
#4I use it on a simple website I built: https://covid19incharts.com This website fetches the Johns Hopkins University COVID-19 data from GitHub (in CSV files), and fetching this every single user action is not feasible. When a user first enters the website, this data is fetched from GitHub, parsed and formatted, and stored in IndexedDB (until it's deemed "stale"). I first used Local Storage, but I needed more space tha…
Re: Ask HN: Have you made any use of IndexedDB?
#5I've used it in a personal React note-taking app project, to add basic offline functionality. It's a nice idea, and it's pretty magical to be able to build an interactive website that can work fully offline. That said, there are some pitfalls you have to watch out for, e.g. database connection contention if you have multiple tabs to the same origin open. The lack of great tooling around indexeddb is also a bummer. So…