Results 1 - 12 of 12

Storage.clear()

The clear() method of the Storage interface, when invoked, will empty all keys out of the storage.
API Method Reference Référence Storage Web Storage

Storage.getItem()

The getItem() method of the Storage interface, when passed a key name, will return that key's value.
API Method Reference Référence Storage Web Storage

Storage.removeItem()

The removeItem() method of the Storage interface, when passed a key name, will remove that key from the storage.
API Method Reference Référence Storage Web Storage

Storage.setItem()

The setItem() method of the Storage interface, when passed a key name and value, will add that key to the storage, or update that key's value if it already exists.
API Method Reference Référence Storage Web Storage

StorageEvent

A StorageEvent is sent to a window when a storage area changes.
API Reference Référence Web Storage API

WindowEventHandlers.onstorage

The WindowEventHandlers.onstorage property contains an event handler that runs when the storage event fires. This occurs when a storage area is changed (e.g. a new item is stored.)
API Property Reference Web Storage WindowEventHandlers

Storage

The Storage interface of the Web Storage API provides access to the session storage or local storage for a particular domain, allowing you to for example add, modify or delete stored data items.
API data Interface Reference Référence Storage Web Storage

Storage.key()

The key() method of the Storage interface, when passed a number n, returns the name of the nth key in the storage. The order of keys is user-agent defined, so you should not rely on it.
API Method Reference Référence Storage storage Web Storage

Storage.length

The length read-only property of the Storage interface returns an integer representing the number of data items stored in the Storage object.
API Property Read-only Reference Référence Storage Web Storage

Web Storage API

The Web Storage API provides mechanisms by which browsers can store key/value pairs, in a much more intuitive fashion than using cookies.
API localStorage Reference sessionStorage Storage storage Web Storage

Using the Web Storage API

Storage objects are simple key-value stores, similar to objects, but they stay intact through page loads.  The keys and the values are always strings (note that integer keys will be automatically converted to strings, just like what object do). You can access these values like an object, or with the getItem() and setItem() methods.  These three lines all set the colorSetting entry in the same way:
API Guide localStorage sessionStorage Storage storage Web Storage API

Window.localStorage

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.
API localStorage Property Reference Référence Storage Web Storage WindowLocalStorage