3 ms·
Another protip: localForage [1] makes it fairly easy to drop in IndexedDB if you're used to the localStorage interface. The only drawback is that you have to re
by andrewstuart2 10y ago
Another protip: localForage [1] makes it fairly easy to drop in IndexedDB if you're used to the localStorage interface. The only drawback is that you have to refactor into using promises, since IndexedDB is async.
[1] https://github.com/localForage/localForage https://github.com/localForage/localForage
- vmorgulis 10y agoNice name and interesting API: https://news.ycombinator.com/item?id=13421321 https://news.ycombinator.com/item?id=13421321
- pfooti 10y agoI'm a big fan of localForage. It handles the fallbacks on various devices. There's a few things it doesn't do super-well (multiple get/set operations in a batch, notably), but it's a great polyfill, especially if you don't want to mess around with the intricacies of indexedDB.