Buckets:
| const cacheName = "DuttBust-Capuchin-1.5"; | |
| const contentToCache = [ | |
| "Build/CapuchinBog.loader.js", | |
| "Build/CapuchinBog.framework.js", | |
| "Build/CapuchinBog.data", | |
| "Build/CapuchinBog.wasm", | |
| "TemplateData/style.css" | |
| ]; | |
| self.addEventListener('install', function (e) { | |
| console.log('[Service Worker] Install'); | |
| e.waitUntil((async function () { | |
| const cache = await caches.open(cacheName); | |
| console.log('[Service Worker] Caching all: app shell and content'); | |
| await cache.addAll(contentToCache); | |
| })()); | |
| }); | |
| self.addEventListener('fetch', function (e) { | |
| e.respondWith((async function () { | |
| let response = await caches.match(e.request); | |
| console.log(`[Service Worker] Fetching resource: ${e.request.url}`); | |
| if (response) { return response; } | |
| response = await fetch(e.request); | |
| const cache = await caches.open(cacheName); | |
| console.log(`[Service Worker] Caching new resource: ${e.request.url}`); | |
| cache.put(e.request, response.clone()); | |
| return response; | |
| })()); | |
| }); | |
Xet Storage Details
- Size:
- 1.06 kB
- Xet hash:
- 16dbe0405b0fc7e572b8f7a55d21ab067129e762a140461f2c19633834cb48ef
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.