cordova cli clear cache code example
Example 1: cordova delete cache
cordova plugin add https:
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);
});