-1

What are the ways to clear the localStorage from the user-side and from the website-side?

For the website-side I found the "localStorage.clear()", but I can't find out if it clears all the localStorage or specifically for the same domain.

As for the user-side, I simply couldn't find any info. about it.

Thanks in advance!

qkhckgxhp
  • 3
  • 1

1 Answers1

0

localStorage is per domain/origin.

Clear it with code using localStorage.clear()

Clear it with the browser as you clear cookies/cache.


Further reading:

Asons
  • 84,923
  • 12
  • 110
  • 165
  • What do you mean as clearing cookies? there's no cookies... nothing to clear. perhaps you mean by that clearing the cache? – qkhckgxhp Jul 30 '16 at 11:41
  • weird, because chrome and firefox doesn't clear it... the IE does. perhaps something else is involved here, can you tell? – qkhckgxhp Jul 30 '16 at 11:45
  • @qkhckgxhp http://superuser.com/questions/519628/clear-html5-local-storage-on-a-specific-page – Asons Jul 30 '16 at 11:47
  • @qkhckgxhp http://stackoverflow.com/questions/30508616/how-to-clear-localstorage-in-firefox – Asons Jul 30 '16 at 11:49
  • omg! dude, thanks! btw: I think it's a bug or something, because I can't delete this localstorage with clearing the browser data(all of it) with chrome. This method worked! Firefox got same problem, but I don't know how to fix it... too damn weird things(can be coincides with 2 of them buged - hm) – qkhckgxhp Jul 30 '16 at 11:50
  • @qkhckgxhp https://nakedsecurity.sophos.com/2014/11/05/how-to-clear-out-cookies-flash-cookies-and-local-storage/ – Asons Jul 30 '16 at 11:51
  • Lol... clearing localstorage with webtools!? :D omfg! but LGSon, you rocks man! thanks for the info! – qkhckgxhp Jul 30 '16 at 11:51