Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to clear local storage values in Internet Explorer 8

I'm using IE8 and the jstorage library to store data in place of cookies. This is all good until i want to clear the stored values. In chrome this is possible by navigating to the content settings page. However in IE8 it only provides an option to clear cookies which doesn't clear the values I've stored in local storage.

Any ideas how i can clear this data? I don't want to display a "clear cache" button

like image 680
cdugga Avatar asked Dec 07 '25 08:12

cdugga


1 Answers

Try localStorage.clear() in Console panel of IE Developer toolbar. It returns an "undefined" but seems to clear local storage.

It is worth mentioning that this function only clears the localStorage of the domain of the current window, not all localStorage values for the browser.

Example: (IE8 issue) If you're website is loading external content within an iFrame, localStorage.clear() won't clear that domain inside of the iFrame unfortunately.

like image 62
Aidin Avatar answered Dec 08 '25 21:12

Aidin