Local storage is a new feature of HTML5 that basically allows you (a web developer) to store any information you want in your user’s browser using JavaScript.
In practice, local storage is just one big old JavaScript object that you can attach data to (or remove data from).
Example:
// Considering it as a object
localStorage.userName = "highskillzz";
//or this way!
localStorage.setItem("objects", "0");
// Once data is in localStorage, it'll stay there forever until it // is removed explicitly
console.log(localStorage.userName + " has " + localStorage.objects + " number of objects.");
// Removing data from local storage is also pretty easy. Uncomment
// below lines
//localStorage.removeItem("userName");
//localStorage.removeItem("objects");
It was designed to be a simple string only key/value store that developers could use to build slightly more complex single page apps. That’s it.