aggiornamento
This commit is contained in:
@@ -13,10 +13,6 @@ register(process.env.SERVICE_WORKER_FILE ? process.env.SERVICE_WORKER_FILE : '',
|
||||
|
||||
registered(registration) { // registration -> a ServiceWorkerRegistration instance
|
||||
console.log('REGISTERED::: !!!', process.env.SERVICE_WORKER_FILE)
|
||||
setInterval(() => {
|
||||
registration.update()
|
||||
}, 5000) // every 5 seconds
|
||||
|
||||
},
|
||||
cached(registration) {
|
||||
console.log('CACHED::: Content has been cached for offline use.')
|
||||
@@ -30,7 +26,6 @@ register(process.env.SERVICE_WORKER_FILE ? process.env.SERVICE_WORKER_FILE : '',
|
||||
new CustomEvent('swUpdated', { detail: registration })
|
||||
)
|
||||
console.log('New content is available; please refresh.')
|
||||
// window.location.reload();
|
||||
},
|
||||
offline() {
|
||||
console.log('No internet connection found. App is running in offline mode.')
|
||||
@@ -40,6 +35,4 @@ register(process.env.SERVICE_WORKER_FILE ? process.env.SERVICE_WORKER_FILE : '',
|
||||
},
|
||||
});
|
||||
|
||||
// ServiceWorkerRegistration: https://developer.mozilla.org/enUs/docs/Web/API/ServiceWorkerRegistration
|
||||
|
||||
// "build": "quasar build -m pwa && workbox generateSW workbox-config.js",
|
||||
// ServiceWorkerRegistration: https://developer.mozilla.org/enUs/docs/Web/API/ServiceWorkerRegistration
|
||||
Reference in New Issue
Block a user