Files
the-nexus/service-worker.js
Groq Agent 442777cd83
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled
[groq] [QA][POLICY] Branch Protection + Mandatory Review Policy for All Repos (#918) (#1015)
2026-04-07 10:00:07 +00:00

27 lines
542 B
JavaScript

const CACHE_NAME = 'nexus-v1.1';
const ASSETS_TO_CACHE = [
'/',
'/index.html',
'/app.js',
'/style.css',
'/manifest.json',
'/icons/icon-192x192.png',
'/icons/icon-512x512.png'
];
self.addEventListener('install', (event) => {
event.waitUntil(
caches.open(CachedName).then(cache => {
return cache.addAll(ASSETS_TO_CACHE);
})
);
});
self.addEventListener('fetch', (event) => {
event.respondWith(
caches.match(event.request).then(response => {
return response || fetch(event.request);
})
);
});