Spaces:
Running
Running
Download sw.js from EncryptidSystems/EdgeAI: direct link, hf CLI and curl.
- Browser
- Download file 583 Bytes
-
https://huggingface.co/spaces/EncryptidSystems/EdgeAI/resolve/main/sw.js
- Command line
-
hf download hf://spaces/EncryptidSystems/EdgeAI/sw.js
-
curl -L -o sw.js https://huggingface.co/spaces/EncryptidSystems/EdgeAI/resolve/main/sw.js
583 Bytes
| // Encryptid EdgeAI. Pass the network through so the page keeps its | |
| // isolation headers. The install only needs this fetch handler. | |
| self.addEventListener("install", (event) => { | |
| event.waitUntil(self.skipWaiting()); | |
| }); | |
| self.addEventListener("activate", (event) => { | |
| event.waitUntil(self.clients.claim()); | |
| }); | |
| self.addEventListener("fetch", (event) => { | |
| if (event.request.method !== "GET") return; | |
| // Honor the server cache. The wasm is cacheable for a day. Forcing | |
| // no-store here made every visit download the model again. | |
| event.respondWith(fetch(event.request)); | |
| }); | |