Clearing localStorage in javascript?

Bnicholas picture Bnicholas · Oct 5, 2011 · Viewed 560.6k times · Source

Is there any way to reset/clear browser's localStorage in javascript?

Answer

Digital Plane picture Digital Plane · Oct 5, 2011

Use this to clear localStorage:

localStorage.clear();