Strange behavior checking for Web Storage availability
<p>Here's my code:</p>

<pre><code>if(typeof(Storage)!==undefined) {
    // Web storage support
    if(localStorage.hashes != "") {
        var hashes = jQuery.parseJSON(localStorage.hashes);
        for (var i = 0; i &lt; hashes.length; i++) {
            // Do stuff here
        }
    }
    else {
        var hashes = [];
    }
}
else {
    // No web storage support
}
</code></pre>

<p>I don't really know what's going on, but when I try to load the page with this code from a device for the first time, the rest of my code doesn't work the way it should. However, if I comment it out then visit the page for the first time everything works. I can then uncomment it, reload the page, and everything will continue to work. This is really the best I can describe what's happening.</p>
