From 5d441ebbce6066c3636168ec5332ae9c2bdb8607 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 1 Oct 2026 06:55:14 -0700 Subject: 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. --- build.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'build.js') 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) -- cgit v1.2.3