0

I was using the below function to clear browser cache from the chrome extension :

function clearBrowsingData(callback, sinceTime) {

var dataSetToRemove = {
    "appcache": true,
    "cache": true
};

var removeOptions = {
    "since": 0
}
if (sinceTime) {
    removeOptions = {
        "since": sinceTime
    }
}


chrome.browsingData.remove(removeOptions, dataSetToRemove, function (data) {
    if (chrome.runtime.lastError) {
        // Something went wrong
        console.warn("Whoops.. " + chrome.runtime.lastError.message);
        // TODO: Show error to the user
        return false;
    } else {
        callback(data);
    }
});
}

But I need to do the same for the edge extension and I am not able to do it because chrome.browsingData.remove has been bridged in Edge . Can someone help me with an alternative to do the same?

Tarun
  • 1

0 Answers0