If i'm not mistaken, IE has implemented (or tried to) the web storage spec since IE8 was released. Now, I've noticed that IE 9 throws an exception when I try to remove an entry that doesn't exist in the localStorage storage object:
window.localStorage.removeItem("data"); //no data entry-> throws exception
Now, I've re-read the spec:
The removeItem(key) method must cause the key/value pair with the given key to be removed from the list associated with the object, if it exists. If no item with that key exists, the method must do nothing.
So, I shouldn't be getting an exception, right?