Use localStorage instead of cookies

localStorage is widely supported:
http://caniuse.com/#feat=namevalue-storage