diff mrjunejune/src/sw.js @ 259:667156fcd3e3

Add dev-only cyberpunk JRPG page
author MrJuneJune <me@mrjunejune.com>
date Wed, 05 Aug 2026 09:19:41 -0700
parents 60a876c4587a
children 1f9877b637e9
line wrap: on
line diff
--- a/mrjunejune/src/sw.js	Wed Aug 05 05:25:40 2026 -0700
+++ b/mrjunejune/src/sw.js	Wed Aug 05 09:19:41 2026 -0700
@@ -1,5 +1,5 @@
 // Root-scoped Service Worker for MrJuneJune PWA
-const CACHE_VERSION = 'v6-zenbu-headless';
+const CACHE_VERSION = 'v9-dev-page-split';
 const CACHE_NAME = `mrjunejune-${CACHE_VERSION}`;
 
 // Files to cache immediately on install
@@ -93,6 +93,11 @@
     return;
   }
 
+  // Development servers should always serve current source and assets.
+  if (url.hostname === 'localhost' || url.hostname === '127.0.0.1') {
+    return;
+  }
+
   // The HLS tool and media must always reflect the current player version.
   if (url.pathname.startsWith('/tools/hls_player') ||
       url.pathname.startsWith('/public/hls-sample/')) {