Local Storage
noun
say it: “LOH-kul STOR-ij” /ˈloʊkəl ˈstɔːrɪdʒ/
Browser storage of keys and values that stays after the page and the browser are closed.
What is Local Storage in JavaScript?
Local Storage — Browser key-value storage that remains after the page and browser are closed.
localStorage.setItem("theme", "dark");
const theme = localStorage.getItem("theme");
In a sentence
- “We keep the token in local storage, so a refresh doesn't sign the user out.”
Level: Freelancer · More JavaScript terms at this level
Updated