Skip to content

Instantly share code, notes, and snippets.

@YonatanKra
Created June 20, 2023 06:30
Show Gist options
  • Save YonatanKra/eba75e5fcf23fc0f6f40178d14af2b8f to your computer and use it in GitHub Desktop.
Save YonatanKra/eba75e5fcf23fc0f6f40178d14af2b8f to your computer and use it in GitHub Desktop.
self.addEventListener('fetch', (event) => {
event.respondWith(
cacheFirst({
request: event.request,
preloadResponsePromise: event.preloadResponse,
fallbackUrl: './assets/images/vivid-logo.jpeg',
})
);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment