From 2f27250bc8f4bbfa4f368abd90874bcc85bf2449 Mon Sep 17 00:00:00 2001 From: Crimekillz Date: Sat, 6 Apr 2024 03:23:31 +0200 Subject: [PATCH] Auto-Refresh page if offline... --- packages/sw/src/sw.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/sw/src/sw.ts b/packages/sw/src/sw.ts index 6131b65ee..14b1faea1 100644 --- a/packages/sw/src/sw.ts +++ b/packages/sw/src/sw.ts @@ -28,7 +28,7 @@ globalThis.addEventListener("activate", (ev) => { }); function offlineContentHTML(): string { - return `Offline. Service Worker @${_VERSION_} `; + return `TrashPoss @${_VERSION_} is currently offline. Retrying in 5 seconds... `; } globalThis.addEventListener("fetch", (ev) => { @@ -48,6 +48,7 @@ globalThis.addEventListener("fetch", (ev) => { status: 200, headers: { "content-type": "text/html", + "Refresh": "5", }, }); }),