Browser - Web API - Local Storage

> (World Wide) Web - (W3|WWW) > Web - Browser

1 - About

Window/localStorage of the web api

The localStorage property allows you to access a local Storage object. 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.

3 - Example

localStorage.setItem('name', myName);
 
// storedName may be null if the 'name' is not found
var storedName = localStorage.getItem('name');
web/browser/localstorage.txt · Last modified: 2019/03/18 21:09 by gerardnico