Friends, search

This commit is contained in:
paoloar77
2022-01-12 00:38:31 +01:00
parent 3de9967571
commit 45993d05c5
27 changed files with 464 additions and 152 deletions

View File

@@ -94,7 +94,7 @@ if (workbox) {
registerRoute(
new RegExp(/\.(?:png|gif|jpg|jpeg)$/),
new CacheFirst({
cacheName: 'images',
cacheName: 'images-upload',
plugins: [
// Ensure that only requests that result in a 200 status are cached
new CacheableResponsePlugin({
@@ -314,9 +314,9 @@ if (workbox) {
)
registerRoute(
new RegExp(/.*\/(?:statics).*$/),
new RegExp(/.*\/(?:public).*$/),
new CacheFirst({
cacheName: 'statics',
cacheName: 'public',
plugins: [
// Ensure that only requests that result in a 200 status are cached
new CacheableResponsePlugin({

View File

@@ -21,6 +21,9 @@ register(process.env.SERVICE_WORKER_FILE ? process.env.SERVICE_WORKER_FILE : '',
// $('#newvers').addClass('btnNewVersShow').removeClass("btnNewVersHide")
},
updated(registration) {
document.dispatchEvent(
new CustomEvent('swUpdated', { detail: registration })
)
console.log('New content is available; please refresh.')
},
offline() {