const CACHE_NAME = 'phantom-caller-v1'; const ASSETS = [ '/', '/index.html', '/style.css', '/script.js', '/components/navbar.js', '/components/footer.js', 'https://cdn.tailwindcss.com', 'https://unpkg.com/feather-icons', 'https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.waves.min.js' ]; self.addEventListener('install', (event) => { event.waitUntil( caches.open(CACHE_NAME) .then((cache) => cache.addAll(ASSETS)) ); }); self.addEventListener('fetch', (event) => { event.respondWith( caches.match(event.request) .then((response) => response || fetch(event.request)) ); });