I am trying to troubleshoot this by capturing any storage events that remove values from local storage. I have an always open dummy page that begins an event listener on load as such:
window.addEventListener("storage", function (evt) { if (evt.newValue == null || (evt.oldValue != "" && evt.newValue == "")) {alert(evt.url);} });
The listener fires just fine. That is not the issue. My issue is that the alert(evt.url) returns "undefined" in mobile browsers. Works just fine on Chrome.
The device is the Samsung Galaxy Tab running Gingerbread OS. The browsers are Dolphin HD and the stock webkit browser.
Edit: Tried it on the iPhone and all works just fine on Safari. Also, the problem only seems to pertain to the url attribute. oldValue, newValue and key all return values.
As far as I understand Web Storage Events have very limited adoption rate among browsers, most of the implementation to date are partial with only Opera (and Chrome) coming close to the W3C standard. See Wikipedia and this Blog post.
I dont think it is very far fetched that while desktop versions of Chrome support ‘events’ in Web Storage (somewhat), the functionality has not been ported to most Android devices which rely on system updates (rather than through the app market) to keep their browsers updated.