Lucas_Werkmeister_WMDE added a comment.
I think I understand what’s going on… this is the cache header we send for
`/index.html` and `/embed.html`:
cache-control: max-age=3600, must-revalidate
Because the HTTP caching spec was written by three knights who only speak in
riddles, `must-revalidate` only means that the response must be revalidated
//when it’s stale//; within that max-age (one hour), it can be freely reused.
So people might see the old `index.html` and `embed.html` files, referencing
JS/CSS files that no longer exist, for up to an hour (or two, three, four
hours, depending on how many cache layers there are). Ideally, the old JS/CSS
files would be cached during that time as well, but apparently that’s not
always happening.
I think what we want instead is `no-cache`, which (obviously!) doesn’t mean
that the response can’t be cached at all, but only that it must be validated
(e.g. `If-Modified-Since`) before the cached response can be reused. This seems
like a better fit for the `/index.html` and `/embed.html` pages. For the JS/CSS
files, we also send `max-age=3600, must-revalidate`, and in that case I think
that’s fine, since those files are basically content-addressed via the hash in
their file name (we could perhaps go even stronger, e.g. `immutable` and long
max-age – but we don’t have to).
TASK DETAIL
https://phabricator.wikimedia.org/T301461
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Lucas_Werkmeister_WMDE
Cc: ItamarWMDE, toan, Lucas_Werkmeister_WMDE, Aklapper, Astuthiodit_1,
AWesterinen, karapayneWMDE, Invadibot, MPhamWMF, maantietaja, CBogen,
Akuckartz, Nandana, Namenlos314, Lahi, Gq86, GoranSMilovanovic, Mahir256,
QZanden, EBjune, merbst, LawExplorer, Salgo60, _jensen, rosalieper, Scott_WUaS,
Jonas, Xmlizer, jkroll, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles,
Lydia_Pintscher, Addshore, Mbch331
_______________________________________________
Wikidata-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]