Even after reloading the page, event.isUpdate returns true
const workbox = await window.$workbox;
if (workbox) {
workbox.addEventListener('installed', (event) => {
if (event.isUpdate) {
console.log('New site available. User can reload the page')
}
});
}
I expected event.isUpdate to return false after reloading unless new versions of the site is available.
Is this an expected behavior or is there something wrong with my config?
Hi I put this code in
created
funciton in layouts/default.vue to implement Refresh to Update NotificationEven after reloading the page,
event.isUpdate
returnstrue
I expected
event.isUpdate
to returnfalse
after reloading unless new versions of the site is available. Is this an expected behavior or is there something wrong with my config?Here is my nuxt.config.js .