added HTML5 localstorage implementation.