Skip to content Skip to sidebar Skip to footer

Remove Value From Localstorage Javascript

I'm trying to remove item from localStorage in javasscript but it doesn't work. It only works manually for the sequence of the following events Right click --> Inspect element -

Solution 1:

what your looking for is this:

deleter voidremoveItem(DOMString key);

You could implement this like so:

localStorage.removeItem(key)

Everything about local storage can be found here on the W3 html5 spec for web storage.

You may find this document more helpful as it goes into more explanation.

*Local storage is not a finished spec and these could change.

Solution 2:

localStorage.clear without the () currently works in major browsers.

Post a Comment for "Remove Value From Localstorage Javascript"