Web Storage
suggest changeSyntax
- localStorage.setItem(name, value);
- localStorage.getItem(name);
- localStorage.name = value;
- localStorage.name;
- localStorage.clear()
- localStorage.removeItem(name);
Parameters
| Parameter | Description |
|---|---|
| name | The key/name of the item |
| value | The value of the item |
Remarks
The Web Storage API is specified in the WHATWG HTML Living Standard. Stored values are strings. Assigning localStorage.name also collides with properties the object already has, such as length and clear.
Simpler way of handling Storage
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents