Closed kopax-polyconseil closed 2 years ago
@yyx990803 please also add SW cache removal to unregister function
// Delete SW Cache
if ('caches' in window) {
caches.keys()
.then(function(keyList) {
return Promise.all(keyList.map(function(key) {
return caches.delete(key);
}));
})
}
Hi @yyx990803 and thanks for sharing. I am reading at your code and I try to understand why this is not
defined
in the function scope : https://github.com/yyx990803/register-service-worker/blob/756fe7fe956b092b0afc86d55a3fd24f181f4da7/src/index.js#L127Thanks in advance,