Skip to content
Permalink
Browse files

Update config.js

  • Loading branch information...
jfadev committed Jun 2, 2019
1 parent ae20327 commit 38037e0eea6c8571ab452870037bb74910e620dc
Showing with 10 additions and 1 deletion.
  1. +10 −1 pwa/config.js
@@ -110,28 +110,37 @@ const PWA_CONFIG = {
// Matching routes with a Regular Expression
regex: /\/(?:login|logout)\//,
},
// Resources are requested from both the cache and the network in parallel.
// The strategy will respond with the cached version if available,
// otherwise wait for the network response.
// The cache is updated with the network response with each successful request.
stalewhilerevalidate: {
active: true,
regex: /\/news\/.*/,
},
// Network first request strategy.
networkfirst: {
active: true,
regex: /.*/,
},
// Cache first request strategy.
cachefirst: {
active: false,
// regex: /.*/,
// maxentries: 500,
// maxageseconds: 365 * 24 * 60 * 60,
},
// Force the response to come from the browser.
cacheonly: {
active: false,
// regex: /.*/,
},
},
// Add your custom service worker for load it.
custom: {
active: false,
script: '',
// service worker script route
// script: '/pwa/sw/my-custom-sw.js',
},
},

0 comments on commit 38037e0

Please sign in to comment.
You can’t perform that action at this time.