diff --git a/frontend/public/sw.js b/frontend/public/sw.js index 674403521..e9631fb1f 100644 --- a/frontend/public/sw.js +++ b/frontend/public/sw.js @@ -1,6 +1,6 @@ // Bambuddy Service Worker -const CACHE_NAME = 'bambuddy-v23'; -const STATIC_CACHE = 'bambuddy-static-v23'; +const CACHE_NAME = 'bambuddy-v24'; +const STATIC_CACHE = 'bambuddy-static-v24'; // Static assets to cache on install const STATIC_ASSETS = [ @@ -62,6 +62,11 @@ self.addEventListener('fetch', (event) => { return; } + // Skip camera stream/snapshot requests - Safari has issues with streaming through SW + if (url.pathname.includes('/camera/stream') || url.pathname.includes('/camera/snapshot')) { + return; + } + // API requests - network first, no cache (real-time data is critical) if (url.pathname.startsWith('/api/')) { event.respondWith( diff --git a/static/sw.js b/static/sw.js index 674403521..e9631fb1f 100644 --- a/static/sw.js +++ b/static/sw.js @@ -1,6 +1,6 @@ // Bambuddy Service Worker -const CACHE_NAME = 'bambuddy-v23'; -const STATIC_CACHE = 'bambuddy-static-v23'; +const CACHE_NAME = 'bambuddy-v24'; +const STATIC_CACHE = 'bambuddy-static-v24'; // Static assets to cache on install const STATIC_ASSETS = [ @@ -62,6 +62,11 @@ self.addEventListener('fetch', (event) => { return; } + // Skip camera stream/snapshot requests - Safari has issues with streaming through SW + if (url.pathname.includes('/camera/stream') || url.pathname.includes('/camera/snapshot')) { + return; + } + // API requests - network first, no cache (real-time data is critical) if (url.pathname.startsWith('/api/')) { event.respondWith(