Files
MindSift/frontend/public/sw.js
T
sandrodach 5c4e130862
MindSift CI & Docker Release / Build, Test in Container & Push (push) Failing after 38s
fix(sqlite,browser): resolve SQLite connection pool deadlock, disable stale SW cache, and update BRAIN.md
2026-10-24 21:27:51 +02:00

19 lines
543 B
JavaScript

// Network-first / cache-clearing service worker to ensure fresh builds across all browsers
self.addEventListener('install', () => {
self.skipWaiting();
});
self.addEventListener('activate', (event) => {
event.waitUntil(
caches
.keys()
.then((keys) => Promise.all(keys.map((k) => caches.delete(k))))
.then(() => self.clients.claim())
);
});
self.addEventListener('fetch', () => {
// Always use native browser network fetch so API calls and fresh Vite bundles are never intercepted by stale caches
return;
});