Spaces:
Running
Running
Download service-worker.js from theWitcher/sagi-ai-tools: direct link, hf CLI and curl.
- Browser
- Download file 536 Bytes
-
https://huggingface.co/spaces/theWitcher/sagi-ai-tools/resolve/main/service-worker.js
- Command line
-
hf download hf://spaces/theWitcher/sagi-ai-tools/service-worker.js
-
curl -L -o service-worker.js https://huggingface.co/spaces/theWitcher/sagi-ai-tools/resolve/main/service-worker.js
536 Bytes
| self.addEventListener('install', event => { | |
| event.waitUntil( | |
| caches.open('ai-tools-cache-v1').then(cache => { | |
| return cache.addAll([ | |
| '/', | |
| '/index.html', | |
| '/manifest.json', | |
| '/styles.css', | |
| '/scripts.js' | |
| ]); | |
| }) | |
| ); | |
| }); | |
| self.addEventListener('fetch', event => { | |
| event.respondWith( | |
| caches.match(event.request).then(response => { | |
| return response || fetch(event.request); | |
| }) | |
| ); | |
| }); |