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!
The sessionStorage object stores data for only one session. (The data is deleted when the browser is closed).
SessionStorage is used for storing data on the client side. Maximum limit of data saving in SessionStorage is about 5 MB.
Web storage objects localStorage and sessionStorage allow to save key/value pairs in the browser. What's interesting about them is that the data survives a page refresh (for sessionStorage ) and even a full browser restart (for localStorage ).
All non-cookie data stored in Safari, such as in local storage, will expire in 7 days. If the data in local storage is accessed within those 7 days, then its expiration date will be extended by 7 days.
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With