Skip to content

Date: 2026-06-20 Repos: ~/projects/monorepo, ~/utils/web/web-deploy Task: Core/_WorkingOn/Tasks/Focus-pages-stale.md


MBR (and SDC) focus page PWAs showed stale content when returned to after using another app. First open and immediate re-open were fine; the issue appeared only after Android backgrounded and then evicted the PWA tab from memory.

Root cause: No Cache-Control header on focus.html. Browsers use heuristic caching when no header is set (typically hours, based on Last-Modified). On resume, Chrome restored the page from HTTP cache rather than re-fetching.


Cloudflare Pages — _headers (both sites)

Section titled “Cloudflare Pages — _headers (both sites)”

Added to sites/mbr/public/_headers and sites/sdc/public/_headers (after the /* block):

/focus.html
Cache-Control: no-cache, must-revalidate

FTP host (talbotstevens.com) — .htaccess

Section titled “FTP host (talbotstevens.com) — .htaccess”

Created sites/mbr/public/.htaccess and sites/sdc/public/.htaccess:

<IfModule mod_headers.c>
<Files "focus.html">
Header set Cache-Control "no-cache, must-revalidate"
</Files>
</IfModule>

Astro copies public/ to dist/ at build time — .htaccess lands in dist/ automatically.

Added .htaccess to FAVICON_FILES in both:

  • sdc-mission-deploy/deploy_mbr_focus.py
  • sdc-mission-deploy/deploy_sdc_focus.py

  • no-cache = always send a conditional GET before serving from cache
    • If server returns 304 (unchanged): serve cache instantly — fast
    • If server returns 200 (changed): use new content — fresh
  • must-revalidate = never serve stale content if the server is reachable
  • NOT no-store — that would prevent any caching, breaking offline access

Monorepo change logs belong at:

  • Core/Logs/Projects/monorepo/YYYY-MM-DD_<topic>.md (this file)
  • In-repo: CHANGELOG.md + LESSONS.md (already established per June 15 session)

Previous focus page work was logged at Core/Logs/Dev/2026-05-26_Focus-Reminders.md (task file) and Core/Logs/Dev/2026-05-31_Focus-Page-Favicons.md. Those were pre-June-15 structure. Use Core/Logs/Projects/monorepo/ going forward.


Run web-deploymbr-focusonline and sdc-focusonline to push the .htaccess files alongside the rebuilt HTML.

After deployment, the PWA will always revalidate focus.html on open. No reinstall required — the next open will get the header-controlled response.