LocalStorage, stops at browser refresh…Why?

jendral_hxr

New Member
I am new to JavaScript, i did this simple code to check local Storage. I just expected this to keep on the storage after refreshing or reopening the file...Here is my code:\[code\]function save(){ localStorage.setItem('test', 'sometext');}\[/code\]I call it through a button on HTML. I open it on the Web Inspector and it's there, but once I refresh it's gone. It should stay there right?
 
Back
Top