views:

100

answers:

2

Does anyone know if current IE9 Beta fully supports HTML5 "localStorage" functionality? Normally the test for "localStorage" support can be done with js code just like:

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

Well, it seems that this kind of test returns "true" but if you try something like:

localStorage.removeItem ('key')

you get an error on the Javascript Console (SCRIPT16389 error). Any more info?

A: 

As you can see on Comparison of layout engines (HTML5) on Wikipedia Web Storage should be supported.

PS: IE9 is Trident 5.0. (thanks EricLaw -MSFT- for the mistake).

Wernight
IE9's Standards-compliant rendering engine is Trident/5.0, as you can see in the IE9 User-Agent string.
EricLaw -MSFT-
+1  A: 

Not entirely sure what the problem here is, because localstorage has been functional in IE since version 8. See:

http://msdn.microsoft.com/en-us/library/cc197062%28VS.85%29.aspx
http://www.quirksmode.org/dom/html5.html

And also, this working example I whipped up: http://jsbin.com/ijega3/edit

Yi Jiang
Ok, thank you Sir. It's my fault ...
Roberto