Persisting stuff between sessions is really easy using using the Window.localStorage API provided by most browsers today.
localStorage is a key/value store, where one can write and read keyvalues. Setting a value is super easy using setItem:
Getting back an item is done using getItem:
Persistence is per domain (and subdomain) which is really nice since one do not have to implement any annoying cookie notifications.