Monday, May 13, 2013

HTML5 localStorage isolation

HTML5 localStorage isolation

I've recently started using one of HTML5's new features of local browser storage, however, when I started using it in my development environment, I noticed that whenever my domain changed, the values put into storage could not be retrieved.

That is, localStorage is isloated by the domain

For example, if my domain was localhost then I changed the web address to be my IP address for example, then there will be separate instances of localStorage for each domain even though they are pointing to the same web server.

Unforutnately, a lot of books and websites, fail to mention this