Fix PDFs still failing on browsers that used the old build #5
1 changed files with 3 additions and 1 deletions
|
|
@ -16,7 +16,9 @@ sw.addEventListener('install', (event) => {
|
|||
event.waitUntil(
|
||||
caches
|
||||
.open(CACHE)
|
||||
.then((c) => c.addAll(ASSETS))
|
||||
// Bypass the HTTP cache: hashed assets are cached as immutable, so a bad
|
||||
// response (e.g. a wrong MIME type) would otherwise be copied in forever.
|
||||
.then((c) => c.addAll(ASSETS.map((url) => new Request(url, { cache: 'reload' }))))
|
||||
.then(() => sw.skipWaiting())
|
||||
);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue