What is the lifetime of local storage?
What is the lifetime of local storage?
According to John Resig, it's not possible to specify expiration. It's completely up to the user.
That's correct! It's upto the user. You can define that. User need to create the timestamp explicitly for the local storage. Because there is no use of storing the too old information. When you define the timestamp value explicitly then you will be asked for whether to flush the storage or not.
Server Management Company
India's Leading Managed Service Provider | Skype: techs24x7
Cpanel Technical Discussions - Lets talk !
There is no time limit for local storage, it doesn't have the expiration limit. User can set ut Manually
To know more about you can visit the following
Difference Between Cookies, Local Storage & Session Storage
Browsers that implement the “Web Storage” draft specification define two properties on the Window object: localStorage and sessionStorage. Both properties refer to a Storage object—a persistent associative array that maps string keys to string values. Storage objects work much like regular JavaScript objects: simply set a property of the object to a string, and the browser will store that string for you. The difference between localStorage and sessionStorage has to do with lifetime and scope: how long the data is saved for and who the data is accessible to.
Storage lifetime and scope are explained in more detail below. First, however, let’s look at some examples. The following code uses localStorage, but it would also work with sessionStorage:
|
Bookmarks