Clearing storage
suggest changelocalStorage.clear() removes every key for this origin from localStorage. It does not clear sessionStorage. Both APIs are browser-only, and reading them can throw when storage is disabled:
localStorage.clear();
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents