Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible to clear HTML5 local storage on a specific web page? I was editing a Javascript demo on http://jsfiddle.net, and I re-arranged the windows in such a way that one of them became impossible to resize. Is it possible to clear local storage on a specific page in this case?

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

Chrome does not yet provide an interface to manage HTML5 local-storage, so to delete local-storage in Chrome, you will need to either manually search for and delete the file in the Local Storage sub-directory in the User Data. You can find it by looking for a file that contains the domain name.

You can also use the Delete cookies and other site and plug-in data entry in the Clear browsing data dialog (chrome://chrome/settings/clearBrowserData or Ctrl+Shift+Delete), however it does not give you fine-grained control at the site level.

For the record, jsfiddle.net does not use local-storage for its frames, it uses standard cookies which you can delete in chrome://chrome/settings/cookies. Just type jsf in the edit box, then click the window_sizes cookie, then the [Remove] button. To delete all cookies at jsfiddle.net, just click the jsfiddle entry (not any spefcific cookie), and press Delete.

share|improve this answer
    
Think this answer is out of date. On Win 7 in chrome dev panel, on the resources tab you can right click individual local storage entries for a specific site and delete them. Seems to be one at a time, but still works. Chrome Version: 35.0.1916.114 –  BoomShaka Jun 9 at 12:55
add comment

While Chrome does not provide a UI for clearing localStorage, there is an API that will either clear a specific key or the entire localStorage object on a website.

//Clears the value of MyKey
window.localStorage.clear("MyKey");

//Clears all the local storage data
window.localStorage.clear();

Every Chrome browser, by default, has the JavaScript console installed. So an alternative method, and perhaps the easiest way, to clear localStorage is to right click on the page, click "Inspect Element", then click the "Console" tab. When the console opens, type the following JavaScript, and press enter:

window.localStorage.clear()

Once done, localStorage will be cleared. Note that this affects all web pages on a single domain, so if you clear localStorage for jsfiddle.net/index.html (assuming that's the page you're on), then it clears it for all other pages on that site. See HTML5Goodies - A Peek into Local Data Storage in HTML 5 for more information.

share|improve this answer
add comment

Chrome now provides an option to clear Local Storage of a specific site. For this, enter this in the Omnibox

chrome://settings/cookies#cont

Now, you can type the site name, select Local storage and click on Remove to clear local storage for the site

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.