Does localStorage.clear (); to clear EVERYTHING from the PC?
1 answer
From the specification forclear
:
The clear () method must atomize so that the list associated with the object is cleared of all key / value pairs, if any. If they are not there, then the method should not do anything.
The above "object" in this context would be localStorage
. What is it localStorage
? From the specification :
The localStorage object provides a storage object for the source.
So it will just clear the data for your origin or domain.
+3
source to share