how to clear cache cordova code example
Example 1: cordova delete cache
cordova plugin add https://github.com/moderna/cordova-plugin-cache.git
document.addEventListener('deviceready', onDeviceReady);
function onDeviceReady()
{
var success = function(status) {
alert('Message: ' + status);
}
var error = function(status) {
alert('Error: ' + status);
}
window.cache.clear( success, error );
}
Example 2: cordova delete cache
cordova plugin add cordova-plugin-cache-clear
document.addEventListener('deviceready', function() {
var success = function(status) {
alert('Message: ' + status);
};
var error = function(status) {
alert('Error: ' + status);
};
window.CacheClear(success, error);
});