setting headers crashes in chrome

This commit is contained in:
Pieter Vander Vennet 2022-06-03 12:15:32 +02:00 committed by GitHub
parent 93eeae931e
commit bbe1d7c35e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,7 +47,7 @@ const cacheFirst = (event) => {
return cacheResponse
}
return fetch(event.request).then((networkResponse) => {
networkResponse.headers.set("Cache-Control","max-age=")
return caches.open(version).then((cache) => {
cache.put(event.request, networkResponse.clone());
console.log("Cached", event.request)