Web Storage API
The simple browser key-value storage made of localStorage and sessionStorage, which stores strings per origin.
In more detail
It is easy to use but synchronous: every read and write blocks the main thread while it touches disk. Use it for small preferences and IndexedDB for anything large.
Related terms
- localStorage — A browser feature that saves small text values for a website so they are still there after the page is closed and reopened.
- sessionStorage — Browser storage like localStorage, but scoped to a single tab and cleared when that tab is closed.
- IndexedDB — The browser's built-in asynchronous, transactional database for storing large amounts of structured data, including files and binary data.
- storage quota — The maximum amount of data a browser lets one origin store.
Taught in
- Client Storage Paradigms: Cookies, Storage Tradeoffs — Frontend Architecture & Web Platform