views:

99

answers:

1

If session storage lasts until the browser is exited, and iPhone/iPad does not exit mobile Safari, then how is sessionStorage handled? It would logically seem to be equivalent to localStorage, but it seems like there would have been a workaround or exception for this. Does anyone know how this is handled?

Thanks!

+1  A: 

The browser can get killed on a memory warning, though.

In general, any specific behaviour might change between OS releases without notice. Maybe session cookies go away if you close all the relevant tabs. Maybe they go away if you close Safari and leave the phone for 24 hours. There's not much you can do apart from extensive testing, and even then, why do you care so much?

For that matter, how should a desktop web browser handle session cookies? I keep my browsers running for weeks (if not months, unless Safari crashes).

tc.
I don't care about this very much, since I am not using session storage. I was just thinking about this, and thought maybe someone here would know. To clarify, I am referring to HTML5 localStorage (specifically, session storage) and not session cookies.
phoffer
The same logic still applies. People don't close web browsers as much as they used to, so anything that lasts "until browser exit" is somewhat meaningless.
tc.