views:

1058

answers:

1

My organization is starting to use this feature and for testing it would be ideal if we could find and delete these values as well as see what's written to disk, but I can't figure out where IE8 is storing them. I found the .sqlite files in

AppData\Local\Apple Computer\Safari for Safari and AppData\Roaming\Mozilla\Firefox\Profiles\ryb7f27l.default\webappsstore.sqlite for FF3.5

Any help on IE8 would be appreciated!

+2  A: 

The location of local storage on the file system is most likely an implementation detail that is not guaranteed to always be the same from version to version (it could even change with a service pack or update to IE).

To clear local storage using the approved methods, see Clearing the Storage Areas on the Introduction to DOM Storage MSDN page:

Clearing the Storage Areas

Session state is released as soon as the last window to reference that data is closed. However, users can clear storage areas at any time by selecting Delete Browsing History from the Tools menu in Internet Explorer, selecting the Cookies check box, and clicking OK. This clears session and local storage areas for all domains that are not in the Favorites folder and resets the storage quotas in the registry. Clear the Preserve Favorite Site Data check box to delete all storage areas, regardless of source.

To delete key/value pairs from a storage list, iterate over the collection with removeItem or use clear to remove all items at once. Keep in mind that changes to a local storage area are saved to disk asynchronously.

An alternative to using the approved methods is to use a tool like Process Monitor to watch disk and Registry accesses while you write something to window.localStorage. Unfortunately, if you see it writing to a file like %userprofile%\Cookies\index.dat it would probably be unwise to delete that file (since it contains information about all the other cookies IE knows about).

EDIT: Using my own suggestion I found that local storage seems to be at %userprofile%\Local Settings\Application Data\Microsoft\Internet Explorer\DOMStore (in Windows XP, Vista and Windows 7 will be slightly different). They are just XML files but I'm not sure how safe they are to delete because of the index.dat (which may retain information about the existence of the XML files or their contents).

Grant Wagner
Thanks, I found this and understand that it can be cleared easily via javascript's localStorage.clear() method, but for our testing, we'll want to see the actual files and maybe setup from cmd files to delete them to make testing easier.
Jody Powlette
That helped, I watched it read/write files and saw it access this path:C:\Users\jody\AppData\LocalLow\Microsoft\Internet Explorer\DOMStore\JPJ0UV5O\10.0.20[1].xmlThe entire DOMStore\ path is hidden+system, but that's it. Thanks for the tip
Jody Powlette
@unknown: See my edits. You might be able to simply remove everything under the `DOMStore` directory in your `%userprofile%` and restart IE. *I haven't tested it, if doing that paralyzes your hamster or causes you any emotional distress, we never spoke and I don't know you. You found it on the intertubes for free, so what do you expect. Good luck.* (Thanks to Scott Hanselman for the excellent disclaimer: http://www.hanselman.com/blog/StepByStepHowToUpgradeFromWindowsXPToWindows7.aspx)
Grant Wagner