localStorage property allows you to access a local
localStorage is similar to
sessionStorage. The only difference is that, while data stored in
localStorage has no expiration time, data stored in
sessionStorage gets cleared when the browsing session ends—that is, when the browser is closed.
myStorage = localStorage;
Note: Please refer to the Using the Web Storage API article for a full example.
|Web Storage (Second edition)
The definition of 'localStorage' in that specification.
|Feature||Chrome||Firefox (Gecko)||Internet Explorer||Opera||Safari (WebKit)|
|Feature||Android||Firefox Mobile (Gecko)||IE Phone||Opera Mobile||Safari Mobile|
|Basic support||2.1||?||8||11||iOS 3.2|
All browsers have varying capacity levels for both
sessionStorage. Here is a detailed rundown of all the storage capacities for various browsers.
Note: Starting with iOS 5.1, Safari Mobile stores
localStorage data in the cache folder, which is subject to occasional clean up, at the behest of the OS, typically if space is short. Safari Mobile's Private Browsing mode also prevents writing to