JSFiddle - React, Tailwind, and code Playground
JavaScript
// check if browser is chrome
if (!!window.chrome && !!window.chrome.webstore) {
let id = "your-cache-id";
// you can find the id by going to
// application>storage>cache storage
// in your chrome developer console
caches.open(id)
.then(cache => cache.keys()
.then(keys => {
for (let key of keys) {
if (key.url.indexOf('file-to-reload.html') !== -1){
cache.delete(key)
.then(window.location.reload(true))
}
}
}));
} else {
window.location.reload(true);
}