I have a Kiosk App that will be used to collect public signups and the signup page is a public website that is displayed in a controlled WebView. I need to clear all of the user's personal data from the WebView cache but can't seem to do that using the Documented procedures.
Here is my WebView markup:
<div><webview id="wv" style="width:100%; height:95%;position:absolute;margin:0px;padding:0px;" partition="extraContent"></webview></div>
Here is the code I use to clear the cache and storage:
var webview = document.getElementById("wv");
var options = {
'since':1000000000
};
var caches = {
"appcache": true,
"cache": true,
"cookies": true,
"fileSystems": true,
"indexedDB": true,
"localStorage": true,
"webSQL": true
};
webview.clearData(options, caches, function() {
webview.terminate();
$("webview").remove();
appendWebview();
});
When clearData
didn't do the job, I started terminating the view entirely and adding a new one with the same markup. Yet still I can see personal details when the new WebView loads. Why is this happening and how can I remove the data?