Post-deploy probe of #4907 / PR #4908 found the Cloudflare zone's Browser Cache TTL override rewrites the origin's Cache-Control: public, max-age=0, must-revalidate on /api/health?compact=1 to public, max-age=1800, must-revalidate (observed live; it also rewrites the gated 401's private, no-store, max-age=0 to private, max-age=1800). CDN-Cache-Control: public, s-maxage=60 is respected — cf-cache-status: HIT + x-vercel-cache: HIT confirm the origin collapse works.
But a 30-min BROWSER cache breaks the freshness display: since PR #4905, healthy checks are synthesized as OK-as-of-checkedAt and FRESH_THRESHOLD is 15 min. A tab whose browser cache serves a 15-30-min-old body computes age > threshold and flips ALL healthy sources to stale, then back to fresh when the cache window rolls — oscillating in ~30-min waves.
Fix: cache: 'no-cache' on the client health fetch — the browser revalidates every poll, Cloudflare answers from its 60s edge cache, origin stays collapsed, checkedAt stays ≤ ~60s + poll interval old (well under threshold). This is the correct client declaration for a freshness poller and is robust against future CF browser-TTL config drift. (Zone-level "respect existing headers" would also help but is CF-dashboard config outside the repo.)
Post-deploy probe of #4907 / PR #4908 found the Cloudflare zone's Browser Cache TTL override rewrites the origin's
Cache-Control: public, max-age=0, must-revalidateon/api/health?compact=1topublic, max-age=1800, must-revalidate(observed live; it also rewrites the gated 401'sprivate, no-store, max-age=0toprivate, max-age=1800).CDN-Cache-Control: public, s-maxage=60is respected —cf-cache-status: HIT+x-vercel-cache: HITconfirm the origin collapse works.But a 30-min BROWSER cache breaks the freshness display: since PR #4905, healthy checks are synthesized as OK-as-of-
checkedAtandFRESH_THRESHOLDis 15 min. A tab whose browser cache serves a 15-30-min-old body computes age > threshold and flips ALL healthy sources tostale, then back tofreshwhen the cache window rolls — oscillating in ~30-min waves.Fix:
cache: 'no-cache'on the client health fetch — the browser revalidates every poll, Cloudflare answers from its 60s edge cache, origin stays collapsed,checkedAtstays ≤ ~60s + poll interval old (well under threshold). This is the correct client declaration for a freshness poller and is robust against future CF browser-TTL config drift. (Zone-level "respect existing headers" would also help but is CF-dashboard config outside the repo.)