added support for html5 local storage