HTML5 Local Storage Revisited

Probably the best way to handle it. But Iā€™m currently using an alternative approach.

var strge = (!!window.localStorage) ? "localStorage" : "cookie" ;
var storage = (strge === "localStorage") ? window.localStorage : false ;

Then,

if(!!storage) { do localStorage stuff; } else { do cookie stuff; }

V/r,

:slight_smile: