Client-Side Storage and Browser State
8 steps · about 3 h 25 min · Intermediate
- 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.
- 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.
- 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.
- 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.
- Basic terminology and architecture of IndexedDB (guide, MDN Web Docs, 25 min)
Learn about object stores, keys, indexes, and transactional databases in the browser.
- 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.
- 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.
- 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.