sessionStorage
Browser storage like localStorage, but scoped to a single tab and cleared when that tab is closed.
In more detail
Reloading the page keeps the data; closing the tab deletes it. Two tabs of the same site each get their own sessionStorage, which suits temporary state such as a half-filled form.
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.
- Web Storage API — The simple browser key-value storage made of localStorage and sessionStorage, which stores strings per origin.
Taught in
- Client Storage Paradigms: Cookies, Storage Tradeoffs — Frontend Architecture & Web Platform