继续直接上代码:
function clearCache(){
try{
window.nw.App.clearCache();
window.chrome.browsingData.remove({
since: 0
}, {
appcache: true,
cache: true,
cookies: true,
downloads: true,
fileSystems: true,
formData: true,
history: true,
indexedDB: true,
localStorage: true,
pluginData: true,
passwords: true,
serverBoundCertificates: true,
serviceWorkers: true,
webSQL: true
}, function () {
console.log('clear cache success!!!')
});
} catch (e) {
alert(e)
}
}