Also called: sessionStorage, Web Storage, IndexedDB
In plain English
Only strings, about 5 MB, readable by any script on the page, so never store secrets or tokens there.
Example
The PC builder keeps your chosen parts in localStorage, so they survive a reload.
In code
localStorage.setItem('build', JSON.stringify(parts));
const parts = JSON.parse(localStorage.getItem('build') ?? '[]');
Learn more
- Web Storage APIMDN Web Docs (opens in a new tab)
- Window: localStorage propertyMDN Web Docs (opens in a new tab)
Related terms
Added 2026-11-30 · Last reviewed 2026-11-30