Volk Überarbeittung und Englisch Varaiblen ersetzt
Backend Image / build-and-push (push) Successful in 3m43s
Frontend Image / build-and-push (push) Failing after 1m10s

This commit is contained in:
Nick Szaunig committed 2026-08-27 10:38:06 +02:00
1 parent 9282777ac9
commit 8520678a48
11 files changed
+231 -104

No files matched your search

+13 -3
View File
@@ -1,4 +1,4 @@
const CACHE_NAME = "apicore-shell-v1";
const CACHE_NAME = "apicore-shell-v2";
self.addEventListener("install", () => {
self.skipWaiting();
@@ -27,12 +27,22 @@ self.addEventListener("fetch", (event) => {
return;
}
// Page navigations must never be answered with a synthetic Response.error() -
// Chrome/Edge render that as a native "This page couldn't load" interstitial
// instead of the app. Let the browser handle navigations directly; only
// static assets (JS/CSS/images) go through the offline-cache fallback below.
if (request.mode === "navigate") {
return;
}
event.respondWith(
fetch(request)
.then((response) => {
const responseClone = response.clone();
caches.open(CACHE_NAME).then((cache) => cache.put(request, responseClone));
return response;
return caches
.open(CACHE_NAME)
.then((cache) => cache.put(request, responseClone))
.then(() => response);
})
.catch(() => caches.match(request).then((cached) => cached || Response.error())),
);