aboutsummaryrefslogtreecommitdiffstats
path: root/build.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-01 06:55:14 -0700
committerAdam Soltys <[email protected]>2026-10-01 06:55:14 -0700
commit5d441ebbce6066c3636168ec5332ae9c2bdb8607 (patch)
tree7e70c783fc0be40eccb09af7499db586c5410526 /build.js
parent981ff1c7f89b27ff3d7c2957e211365baff0a359 (diff)
downloadcoinosv3-5d441ebbce6066c3636168ec5332ae9c2bdb8607.tar.gz
coinosv3-5d441ebbce6066c3636168ec5332ae9c2bdb8607.zip
Serve a shared snapshot for the public feed
Build the default Popular feed once on the server and let browsers verify and paint its signed events before slow media finishes. Keep custom relays, pagination, filtering, and relay fallback on their existing paths.\n\nAdd stale-while-refresh persistence, service-worker bypass, development integration, and unit/browser coverage.
Diffstat (limited to 'build.js')
-rw-r--r--build.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/build.js b/build.js
index 2bc5361..848ce92 100644
--- a/build.js
+++ b/build.js
@@ -84,6 +84,9 @@ self.addEventListener('fetch', (e) => {
// cached "unconfirmed"). Straight to network, always.
if (/^\\/(esplora|sp|lnurlp|electrum)\\//.test(u.pathname) || u.pathname.startsWith('/.well-known/')) return;
+ // Feed snapshots have their own short HTTP lifetime; never freeze one in Cache Storage.
+ if (u.pathname === '/api/feed') return;
+
if (req.mode === 'navigate') {
e.respondWith(
fetch(req)