Stats

404 Contributors: 12 Monday, December 5, 2016
Licensed under: CC-BY-SA
Not affiliated with Stack Overflow
Rip Tutorial: riptutorial@gmail.com
Roadmap: roadmap
Download eBook

Web Storage

Download javascript eBook

Syntax

  • localStorage.setItem(name, value);

  • localStorage.getItem(name);

  • localStorage.name = value;

  • localStorage.name;

  • localStorage.clear()

  • localStorage.removeItem(name);

Parameters

ParameterDescription
nameThe key/name of the item
valueThe value of the item

Remarks

The Web Storage API is specified in the WHATWG HTML Living Standard.

Related Examples