Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how long does session storage on iPhone/iPad last?

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!

like image 211
Paul Hoffer Avatar asked Jul 19 '10 04:07

Paul Hoffer


People also ask

How long does session storage last?

The sessionStorage object stores data for only one session. (The data is deleted when the browser is closed).

What is the size of session storage?

SessionStorage is used for storing data on the client side. Maximum limit of data saving in SessionStorage is about 5 MB.

Is session storage cleared on refresh?

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 ).

How often does Safari clear local storage?

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.


1 Answers

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).

like image 71
tc. Avatar answered Nov 14 '22 10:11

tc.