2026-09-15
An hour of cache, and a half-deployed website
On 13 September 2026, a screenshot from a real phone showed two overlapping buttons on this website, while the server was sending the corrected version and our own screenshots were fine. The cause was not the layout. It was the cache lifetime, different for the page and for the script.
Two lifetimes, two versions
The HTML page expired after five minutes, the chat button's script after an hour. The phone therefore had the new page and the old script. The two files had to agree on a height written by hand on each side, and that agreement broke exactly where it could not be checked: on a machine holding one of the two in cache.
A defect no screenshot reproduces
Our screenshots were taken on machines that loaded both files together. The defect only existed during the hour after each deployment, and only for a visitor who came back in between. A control screenshot could only miss it.
Two fixes, and the second is the real one
The button now measures its own height and publishes it; the reminder uses that value, with a fallback for when the script has not loaded yet. No number is written twice in two files any more. And the script expires with the page: both last five minutes, because the scripts carry no fingerprint in their name. The test that pinned the old policy now checks the only thing that matters, that the code and the page expire together.
The rule we keep
Files that must agree expire together, or carry a fingerprint in their name. A longer cache lifetime for the script than for the page speeds nothing up: it leaves the website half deployed for the whole length of the gap, for returning visitors only.
Files that must agree expire together, or carry a fingerprint in their name.