localStoge allows you store any information in browser. It is new feature of HTML5, and using method is similar to hashmap(with key and value). To store data, use this syntax:
And to get data, use:
localStorage also provide method to delete data:
localStorage.removeItem(value); //delete one localStorage.clear(); //delete all
Read more about document: https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage
Because it's pretty basic and simple, localStorage only store string data, if data is more complex, it becomes useless. Addition, the limit of data is small(about 5mb); and it has not security. Therefore, think carefully before use localStorage.