At its core, localStorage is a simple key-value store which uses strings as keys and can only store strings as values. Even if you try to store a non-string object into localStorage, it will be converted into a string before it is saved. This means that the developer has to worry about coercing the data back into the intended type before it is used in code again. Still, localStorage's ability to save data between sessions and browser restarts without relying on massive cookies makes it an appealing storage mechanism.