I need to squirrel away some data in a way that will preserve the data between pages. I was using a cooke, but of course that sends it back to the server with each new request, and that’s bad for a variety of reasons. So I did a search and found this:
He explains the approach:
The big downside is that this information is stored & accessible to pages outside the domain, so if another web page knows to peek at windows.name, then that page can also see your data. Not safe!
The HTML5 localStorage is still a more attractive option, but I did think this approach was clever.
Here’s a good link talking about localStorage, and options for browsers that don’t support it: