Spaces:
Running
Running
Commit History
Yesterday
-
fix(pwa+numerals): stuck-device SW cure — build-signed SW URL; device-locale-proof digits
ahmdelbaz28-uxOWNER REPORTS (2026-12-03): 1) SAME deploy: footer Facebook tap fixed on one phone, still dead on the original phone. 2) Home counters rendered Arabic-Indic digits while the UI was English. ROOT CAUSES: 1) PRE-2026-11-26 shells served /sw.js with NO Cache-Control (serve-static default), so old phones kept a heuristic-fresh ancient sw.js in HTTP cache; SW update checks consulted it, the ancient precached-shell worker (navigateFallback era, no in-shell self-heal) was never replaced — the device ran the pre-fix bundle forever. Fresh devices fetched everything new — hence the two-phone divergence. 2) Bare .toLocaleString() followed the DEVICE locale, not the site language: ar-EG devices got Arabic-Indic digits inside the English UI. FIXES: - main.tsx v4: SW registered at /sw.js?v=<buildId> (token from the shell's cache-nuke tag) + updateViaCache:'none' — every deploy presents a NEW script URL no cached sw.js can answer; new worker installs (skipWaiting+clientsC…c7ed040