index.html is edge-cached for 24h, so deployed fixes can take a day to reach users
I maintainer di solito rispondono entro 1 giorno
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Found while investigating #659, where a fix merged on 22 Sept and a tester still saw the old behaviour a day later.
The policy
$ curl -sI https://app.block52.xyz/
cache-control: public,max-age=10,s-maxage=86400
server: cloudflare
cf-cache-status: HIT
s-maxage=86400 applies to index.html. In a Vite SPA that file is the only unhashed entry point: it names the hashed bundle (/assets/index-BaWNmZ57.js). Cache the HTML for a day and the edge keeps handing out a day-old bundle reference, so a user gets the old JavaScript no matter how recently we deployed.
That is backwards. The hashed assets are content-addressed and safe to cache forever; the HTML that points at them must be revalidated.
Why it matters beyond one stale page
It makes verification unreliable. In #659 the sequence was: fix merged 22 Sept 09:25 UTC → tester reports it still broken 22 Sept 23:57 → the build they were served was replaced at 23 Sept 02:21. Nobody could tell whether the fix was wrong or simply not yet visible, and the same ambiguity will attach to every "still happening" report — including the live-verification pass in #646.
It also means a bad deploy is equally sticky: a rollback does not reach users promptly either.
Suggested
-
index.html:cache-control: no-cache(ormax-age=0, must-revalidate). The file is ~1KB; revalidation is cheap and the assets it references still come from cache. -
/assets/*(hashed):public, max-age=31536000, immutable. Safe precisely because the filename changes with the content. - Confirm where the header is set —
vercel.jsonin this repo, or a Cloudflare rule in front of it. The response is served by Cloudflare (cf-cache-status: HIT), so a page/cache rule there can override whatever the origin sends. - After changing it, verify: deploy, then
curl -sI https://app.block52.xyz/ | grep -iE 'cache-control|last-modified'and check a fresh bundle name appears without waiting. - Worth recording the deployed commit somewhere reachable — a
<meta name="build-commit">or a/version.json— so a bug report can say which build it came from. Today the only handle is the bundle filename.
Refs #659, #646.
- Lingua principale
- TypeScript
- Stelle
- 2
- Fork
- 5
- Merge medio
- 22h 35m
- PR unite (30g)
- 91
Preparare l'ambiente
Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di block52/ui
-
enhancement tech debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
feat(ui): player notes and tags — click a seat to note a player; tag icons (fish, shark, tight, loose…) show by their pillForse già presa @Dzeezbtc l’ha presa oggi. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
chore(ui): move existing inline null/empty and typeof checks to the guardsForse già presa @bitcoinbrisbane l’ha presa 1 giorno fa. Apertarefactor tech debt UI
block52/ui#937 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
architecture refactor tech debt
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
Add: Class TV ModaApertacheck:passed streams:add
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
GiganticMinecraft/seichi-playguide#183 ·
I maintainer di solito rispondono entro 1 giorno
-
area: core complexity: easy impact: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
ueberdosis/tiptap#8668 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
longbridge/nsh#804 ·
I maintainer di solito rispondono entro 1 giorno