IndexedDB Indexes & Cursors Playground

Mr. Tono’s card box: indexes, IDBKeyRange and cursor directions on the real IndexedDB. Every folder the cursor touches is noted; then try a new index without…

Why it matters

Getting everything and filtering in JavaScript feels fast on small data, then slow when there are thousands. An index and an IDBKeyRange let the browser jump straight to the part you want, and a cursor reads one at a time without loading it all. The small rules that catch people: an index is made only when the version goes up, a range’s bounds can be open, and the cursor’s direction decides what happens to repeats.

The key idea

An index is cards already sorted, a cursor touches them one by one

Common mistakes

Try it in this playground