Web Storage and IndexedDB: save data between visits

10 steps · about 4 h 2 min · Beginner

  1. Getting Started with Web Storage API - Local Storage and Session Storage (blog, Alex Devero, DEV Community, 15 min)

    It starts with the simplest key-value storage, and you can try each call in the console.

  2. Window: sessionStorage property - Web APIs (doc, MDN Web Docs, 10 min)

    The official docs explain how sessionStorage differs from localStorage, with a text-autosave example.

  3. Web Storage Explained – How to Use localStorage and sessionStorage in JavaScript Projects (article, freeCodeCamp, 25 min)

    A to-do exercise where you use JSON.stringify and JSON.parse to keep lists across reloads.

  4. IndexedDB key characteristics and basic terminology (guide, MDN Web Docs, 15 min)

    Once you hit the limits of simple strings, you need this vocabulary: transactions, object stores, and same-origin rules.

  5. How to use IndexedDB to store data for your web application in the browser (video, Alex Eagleson, YouTube, 25 min)

    A gentle first video on why you would choose IndexedDB, with basic database concepts explained.

  6. IndexedDB Crash Course with JavaScript (video, Hussein Nasser, YouTube, 47 min)

    Builds the open, upgrade, store, add and cursor flow step by step, so you code along.

  7. hnasr/indexedDB: IndexedDB tutorial (repo, Hussein Nasser, GitHub, 10 min)

    The video's own code, so you can run it and compare it with yours.

  8. Using IndexedDB - Web APIs (tutorial, MDN Web Docs, 45 min)

    The reference tutorial for versioning, key paths, indexes and cursors, which you can read once the basics make sense.

  9. IndexedDB Part 1 - Creating and Versioning (video, YouTube, 20 min)

    Goes deeper on database versioning and schema upgrades, which trip up many beginners.

  10. mdn/IndexedDB-examples (repo, MDN, GitHub, 30 min)

    Working examples to read and modify, so you can build your own small offline app.