Files
dickendock/frontend/public/sw.js

10 lines
406 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Passiver Service Worker nur für PWA-Installierbarkeit, kein Caching
// Verhindert schwarze Seiten nach Rebuilds
self.addEventListener('install', () => self.skipWaiting());
self.addEventListener('activate', e => e.waitUntil(
caches.keys().then(keys => Promise.all(keys.map(k => caches.delete(k))))
.then(() => self.clients.claim())
));
// Alle Requests direkt ans Netzwerk kein Intercept