Taken from my answer here
The supposed answer to your solution is localStorage()...
It's Javascript dependent and definitely not a perfect solution, but HTML5 localStorage allows you to store preferences on your users' computers.
First, detect support for localStorage():
if (Modernizr.localstorage) { // with Modernizr
if (typeof(localStorage) != 'undefined' ) { // Without Modernizr
Then set a parameter if it's supported:
localStorage.setItem("somePreference", "Some Value");
And then later retrieve it, as long as your user hasn't cleared local storage out:
var somePreference = localStorage.getItem("somePreference");
When you want to clear it, just use:
localStorage.removeItem("somePreference");
For those using unsupported (older) browsers, you can use [local storage hacks][2] abusing Flash LSOs, but those are definitely not ideal.
What about sessions or cookies?
Both of these are intentionally temporary forms of storage. Even Flash LSOs are better than cookies for long-term storage.