Today I've played with this great feature of HTML5 for the first time. It was pretty straighforward and comfortable.
Then to retrieve it from the store and convert to an object again:
var user = JSON.parse(localStorage.getItem('user'));
If we need to delete all entries of the store we can simply do:
You can find JSON library to stringify and parse the objects here: