Learn browser storage with localStorage, sessionStorage, and IndexedDB — when to use each API for saving preferences, caching data, and offline support.
Tutorial series
Browser APIS
12 tutorials — follow in order for the best learning path.
- Browser Storage: localStorage, sessionStorage, and IndexedDB
- Fetching Data: fetch vs XMLHttpRequest
Learn how to fetch data with fetch() and XMLHttpRequest. Compare both browser HTTP request APIs and decide when to use each one in your projects.
- Getting the User's Location with the Geolocation API
Learn how to use the Geolocation API to get a user's location in the browser. Covers getCurrentPosition, watchPosition, permissions, and privacy best practices.
- Using the Notifications API to send desktop notifications
Learn how to use the browser Notifications API to display desktop notifications to users, request permission, and handle notification events.
- Using the Clipboard API to copy and paste text in JavaScript
Copy and paste text with the Clipboard API in JavaScript. Covers writeText, readText, permissions, browser requirements, and fallback for older browsers.
- The Intersection Observer API for Viewport Detection
Learn how to detect when elements enter or leave the viewport using the Intersection Observer API for performant lazy loading and scroll-based features.
- How to use the Resize Observer API in JavaScript
Track element size changes with the Resize Observer API to build responsive components, dynamic layouts, and interfaces that adapt to container resizing.
- The Mutation Observer API for Detecting DOM Changes
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.
- Browser Service Workers: Offline Caching and Network Interception
Learn how to use service workers to cache resources, enable offline functionality, and intercept network requests for faster web applications.
- Browser WebSockets: Real-Time Bidirectional Communication
Learn browser WebSockets for persistent bidirectional communication. Build real-time features like chat and live updates with the WebSocket API.
- 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.