JavaScript Storage : Object
Storage allows saving data in the web browser that can be retrieved in future views of the web page. The browser
has two types of storage:
localStorage
which stores data across
page views, browser restarts and computer restarts, and sessionStorage
which only stores data across page views.
sessionStorage
is deleted when the user closes the browser.
Instance Methods
clear() : undefined
Removes all items from the storage. See also removeItem()
.
Example:
RunResults:
Returns the key for the item at index
in this
. Use this[key]
or this.getItem(key)
to
retrieve the value for the returned key.
Example:
RunResults:
Copyright © PUBLIC Contributors