localStorage is a feature of HTML5s Web Storage. You can store or retrieve as the followings:
localStorage[key] = value; value = localStorage[key]; delete localStorage[key]; localStorage.setItem(key, value); value = localStorage.getItem(key); localStorage.removeItem(key); localStorage.key = value; value = localStorage.key; delete localStorage.key;
You can list:
for (key in localStorage) console.log(key, localStorage[key]);
You can clean up at once:
localStorage.clear();
You can put every thing in but you might not get what you put in, because
The setItem(key, value) method must first create a structured clone of the given value. If this raises an exception, then the exception must be thrown and the list associated with the object is left unchanged. If constructing the structured clone would involve constructing a new ImageData object, then throw a NOT_SUPPORTED_ERR exception instead.