Friends, search
This commit is contained in:
@@ -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({
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user