Back to JavaScript

JavaScript Tutorial

Browser Storage and Web APIs

Use browser features such as localStorage, sessionStorage, and Web APIs.

Browsers provide APIs for storage, location, history, clipboard, notifications, and more.

Storage APIs help save small pieces of data in the browser.

javascript
localStorage.setItem("theme", "dark");

const theme = localStorage.getItem("theme");