added features and fixes

This commit is contained in:
2026-07-02 15:34:00 +00:00
parent eb5b7d55a4
commit 89f8381e2d
30 changed files with 1718 additions and 206 deletions
+4 -1
View File
@@ -1,6 +1,6 @@
// ponytail: bump CACHE_NAME on each deploy, or stale HTML breaks assets.
// Network-first for navigation (index.html) keeps hashed asset refs fresh.
const CACHE_NAME = 'dumpster-v2';
const CACHE_NAME = 'dumpster-v3';
self.addEventListener('install', () => {
self.skipWaiting();
@@ -22,6 +22,9 @@ self.addEventListener('fetch', (event) => {
// Skip API + WS
if (url.pathname.startsWith('/api/') || url.pathname.startsWith('/ws')) return;
// Skip cross-origin requests (e.g. Giphy, LiveKit)
if (url.origin !== self.location.origin) return;
// Network-first for navigation requests (index.html) — always fetch fresh HTML
// so hashed asset references stay current after deploys.
if (event.request.mode === 'navigate') {