I have a native application that uses a UIWebView and notice that with sites like Google, they are using an HTML5 local database for storing information. I am using native APIs for clearing items out of the cookie store, but clearing the persistent cookie store does nothing to remove these local databases. Is there a way to remove them through a native API?
UPDATE:
Is there a way to do this through a non-native API or javascript?
You can remove all localstorage variables by using a function like this.
Of course if you need to only get rid of certain variables or simply set them to default values types then this will have to be modified. I am not familiar enough with UIWebView or your use case to know which variables you would want removed.
You can run this JavaScript directly in your url bar:
Note that local storage is same domain scoped, so it will clear the storage of the current domain that you are.
Currently google uses it for google Analytics, adSense, etc.