차량 모니터 에셋 갱신 보강
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
const CACHE_NAME = 'car-monitor-v2';
|
||||
const CACHE_NAME = 'car-monitor-nocache-v20260721';
|
||||
const CORE_ASSETS = [
|
||||
'/car/assets/favicon.svg',
|
||||
'/car/assets/icon-192.png',
|
||||
'/car/assets/icon-512.png',
|
||||
'/car/assets/apple-touch-icon.png',
|
||||
'/car/assets/site.webmanifest'
|
||||
];
|
||||
|
||||
self.addEventListener('install', event => {
|
||||
@@ -32,18 +27,5 @@ self.addEventListener('fetch', event => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.request.mode === 'navigate' || url.pathname.endsWith('.php') || url.searchParams.has('mode')) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.respondWith(
|
||||
fetch(event.request)
|
||||
.then(response => {
|
||||
if (!response || !response.ok) return response;
|
||||
const copy = response.clone();
|
||||
caches.open(CACHE_NAME).then(cache => cache.put(event.request, copy));
|
||||
return response;
|
||||
})
|
||||
.catch(() => caches.match(event.request))
|
||||
);
|
||||
event.respondWith(fetch(event.request, { cache: 'no-store' }));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user