Client-Side Storage and Browser State

8 steps · about 3 h 25 min · Intermediate

  1. Overview of the Web Storage API and storage quotas (guide, MDN Web Docs, 25 min)

    Understand synchronous key-value storage mechanisms, persistence, and storage limits.

  2. Persisting data with the Web Storage API (localStorage and sessionStorage) (tutorial, MDN Web Docs, 25 min)

    Save, retrieve, and serialize string and JSON key-value data across page visits.

  3. Synchronizing state across browser tabs with the storage event (guide, MDN Web Docs, 20 min)

    Listen for cross-window and cross-tab localStorage mutations to keep UIs in sync.

  4. HTTP cookies: session management, security flags, and SameSite (guide, MDN Web Docs, 30 min)

    Understand HttpOnly, Secure, SameSite attributes and client-side document.cookie limitations.

  5. Basic terminology and architecture of IndexedDB (guide, MDN Web Docs, 25 min)

    Learn about object stores, keys, indexes, and transactional databases in the browser.

  6. Working with IndexedDB: creating stores, transactions, and queries (tutorial, MDN Web Docs, 35 min)

    Perform asynchronous database schema migrations and CRUD operations for structured client data.

  7. Storage for the web: choosing the right client storage mechanism (guide, web.dev, 25 min)

    Follow storage best practices regarding durability, quotas, and eviction policies.

  8. Managing browser storage quotas and persistence with StorageManager (guide, MDN Web Docs, 20 min)

    Inspect available storage space and request persistent storage to prevent data eviction.