localStorage cleared in exit (IE10)

I got nowhere with this in General Web Dev, so I’m moving it here. :slight_smile:

Hello, everyone,

I’m just playing around, a bit, with localStorage. Pretty interesting stuff, I must say.

However, I am experiencing a bit of a confusion.

I have code that will set an item to the current URL so that when the browser is closed then reopened, it should redirect to the same page on that site.

This is working flawlessly in FF and Chrome. But IE 10 (in STANDARDS mode, not quirks mode) is not saving this information. If I close, then re-open the browser and check the localStorage, the value I had set is gone!

Is anyone aware of what might be causing this?

UPDATE: Protected mode is off. And, yes, I am checking F12 to see that the value is being set - it’s just not being retained if the browser is closed.



Okay… here’s where I’m getting a bit confused.

If I turn OFF the checkbox for “Delete browsing history on exit”, the localStorage values will be retained after the browser is closed.

If I turn ON the checkbox for “Delete browsing history on exit”, the localStorage values disappear after the browser is closed.

What does browsing history have to do with localStorage???



Microsoft should rename themselves Moronsoft perhaps?


From the MSDN site:

There’s an old article here that mentions a few inconsistencies with cache, cookie and local storage handling (might be out of date now though).

Thanks for the link, @PaulOB. I guess I’m just disappointed in the “logic” of clearing localStorage with browsing history. It makes sense to clear localStorage when clearing cookies, or cached data. But to remove data from localStorage when clearing the list of URLs previously visited doesn’t seem very intuitive, to me. (shrug)



This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.