Learn how to store data in the browser using localStorage, sessionStorage, and IndexedDB. Understand when to use each storage API.
Tutorial series
Browser APIS
12 tutorials — follow in order for the best learning path.
- Storage: localStorage, sessionStorage, and IndexedDB
- Fetching Data: fetch vs XMLHttpRequest
Learn the differences between fetch() and XMLHttpRequest for making HTTP requests in the browser, and when to use each API.
- The Geolocation API
Learn how to get the user's location in the browser using the Geolocation API with navigator.geolocation.
- The Notifications API
Learn how to use the browser Notifications API to display desktop notifications to users, request permission, and handle notification events.
- The Clipboard API
Learn how to read from and write to the system clipboard using the modern Clipboard API in JavaScript.
- The Intersection Observer API
Learn how to detect when elements enter or leave the viewport using the Intersection Observer API for performant lazy loading and scroll-based features.
- The Resize Observer API
Learn how to track element size changes with the Resize Observer API for responsive components, dynamic layouts, and adaptive interfaces.
- The Mutation Observer API
Learn how to detect and respond to DOM changes using the Mutation Observer API for monitoring element additions, attribute changes, and text modifications.
- Web Workers: Running Code Off the Main Thread
Learn how to use Web Workers to run JavaScript in background threads, keeping your UI responsive during heavy computations.
- Service Workers and Caching
Learn how to use Service Workers to cache resources, enable offline functionality, and intercept network requests for faster web applications.
- WebSockets in the Browser
Learn how to establish persistent bidirectional communication between browser and server using WebSockets. Build real-time features like chat and live updates.
- IndexedDB Client-Side Databases: A Practical Browser Storage Tutorial
Learn IndexedDB client-side databases in the browser. Store structured data, run transactional writes, use cursors, and build reliable offline-first apps.