sessionStorage
and localStorage
are identical:Method | Description |
---|---|
getItem(key) | Returns an item of data from the storage container, referenced by its key |
setItem(key, item) | Adds an item of data to the storage container, referenced by its key |
key(index) | Returns the key for an item of data at the numerical index specified |
removeItem(key) | Removes an item from the storage container, referenced by its key |
clear() | Clears out all data in the current storage container |
length | Identifies how many items of data are in the storage container |