nfldb_m2
This is an old revision of the document!
self.addEventListener('fetch', (event) ⇒ {
event.respondWith(
fetch(event.request)
.then((networkResponse) => {
// Clone the response before caching (it can only be read once)
return caches.open('dynamic-cache').then((cache) => {
cache.put(event.request, networkResponse.clone());
return networkResponse;
});
})
.catch(() => {
// Fallback to cache if the network request fails (offline)
return caches.match(event.request);
})
);
});
nfldb_m2.1780235593.txt.gz · Last modified: 2026/05/31 13:53 by admin