среда, 11 февраля 2009 г.

Examine HTML5 localStorage and sessionStorage data with Web Inspector

Original: Examine HTML5 localStorage and sessionStorage data with Web Inspector

View of Databases panel in WebKit Web Inspector, showing localStorage data of a particular Web app

The Database panel in WebKit's Web Inspector now allows you to examine HTML5 per-origin client-side persistent data (name-value pairs) associated with a particular Web application — both localStorage data and sessionStorage data. That's in addition to the ability it already had for allowing you examine per-origin/application client-side SQL data.

If you want to play around with it, feel free to play around with this: simple localStorage demo app. That demo app is a copy of one that Hixie set up at the WHATWG site — with one modification: I added a Delete button so that you can remove items (name-value pairs) and see the results reflected in Web Inspector.

It seems we have Nokia's Yael Aharon to thank for submitting the patch that added this capability. I'd also guess that, as Yael suggested in the the WebKit bug report associated with the change, the Databases panel will eventually simply renamed Storage.

I'd also guess that capabilities will eventually be added for changing the name-value data directly from within Web Inspector (instead of being limited to only examining the data) — similar to the way that Web Inspector and similar developer tools in other browsers already allow you to change CSS properties and contents of the DOM.

Anyway, here's hoping that developer tools in other browsers will at least also add the same kind of capabilities that Web Inspector now has for examining client-side persistent data.

Комментариев нет: