views:

43

answers:

1

According to everything I've read, Firefox 3.5+ supports localStorage. And yet I'm seeing the alert (failing) in Firefox 3.6. Do I have some strange settings in my Firefox? Any ideas?

function supports_html5_storage() {
    try {
        return 'localStorage' in window && window['localStorage'] !== null;
    } catch (e) {
        alert('failing');
        return false;
    }
}

Note: The page has an HTML5 doctype (though I think this makes no difference).

+2  A: 

Even though Firefox supports localStorage, it can be turned off. Check that it is turned on.

Go to about:config and check that dom.storage.enabled is set to true.

TRiG