gsklee / ngStorage

localStorage and sessionStorage done right for AngularJS.
MIT License
2.33k stars 461 forks source link

Deleting value from session storage manually retains value in $sessionStorage.get #107

Closed asadsahi closed 9 years ago

asadsahi commented 9 years ago

I set a value in session storage using $sessionStorage.name. Then in the same browser session, I deleted the same session storage value by going in the developer tools window. However, $sessionStorage.name is still returning the value, unless I reload the page by hard refresh, at this point the value is not available. I expect that if the value is not in the session storage, then the ngStorage session storage service should not return the value.

Here is jsBin having same issue: http://jsbin.com/vopehu/1/edit?html,js,output

Really confused. Please help.

egilkh commented 9 years ago

Good catch. I'll provide a pr tomorrow if I can.

asadsahi commented 9 years ago

Thanks @egilkh , I was planning to switch to another storage library, but like the simplicity of ngStorage. Will keep an eye on the updated. Thanks again.