A copy that says it is one
Two more items of the PWA audit. If the page came from the network and the record text from the worker's cache, the card now says the text is a copy, and from what date. And the axis no longer stitches record text from another build onto the page: the card offers to open the page again.
What the audit found
After an update that keeps the offline copy, the PWA audit report of 26 September still held two medium-weight items, R2 and R3. Both are about the record text, which the axis loads as a separate file, data.json, after its first frame.
R2. When the network did not deliver data.json, the worker quietly took it from the cache. The line “You are offline: this is a copy saved on …” was added only when the whole page came from the cache. But the page could come fresh from the network while the record text was a copy of an earlier build. The audit showed this on evt-0198: the card said “sources gathered automatically” and named three sources, while the data already had a human review and four sources. An old verification line passed for the current one. The README promises otherwise: the reader always sees the current reviewed text when there is a network.
R3. If data.json came from another build than the page, the axis asked for it again, past the caches. The second mismatch was accepted. So one screen held two editions: the axis’s marks and counts from one build, verification and source counts from another. The 6-in-1 gave both items to one chat, since they are two sides of one flaw.
The tests first
Two new tests. In tests/browser/pwa.spec.ts the page comes from the network, and the worker’s request for data.json is cut. The card must show a dated copy note. In tests/browser/atlas.spec.ts, with no worker, the server answers twice in a row with record text stamped by another build. The card must move to a recoverable state, not stitch two editions. Both failed on the old code. The first failed exactly as the audit described: the verification badge from the cached text sat on the card, with not a word about a copy.
What changed
The worker now keeps every *.json with the time it was fetched, as it does pages. When the network fails and it answers with a copy, it marks it with a header. The axis reads that header and writes on the card and above the list: “The record text did not arrive from the network: this is a copy saved on …” with the date. The words “You are offline” are left out on purpose. One file did not arrive, and the reader may well be online, so the line is about the text, not the network. That is why it has its own lines in the dictionary, four keys in uk and en together.
The axis now never accepts record text from another build. After the second mismatch the card explains that the page and the text are from different versions of the atlas, and offers “Open the page again”. It is a link to the very address the reader is on, with the period, the record, the view and the search. The same serializer that writes the axis’s other addresses writes it. The reader reloads the page, once, by pressing it. The island never does so on its own, so a server that keeps answering with the wrong build costs the reader one line on the card, not a loop of reloads. The test presses that link and checks that the same card fills in once the server answers with matching text.
The report also offered a broader option: naming data.json after the build’s version, so a page asks for exactly its own file. I declined it. Vercel replaces a deployment whole, so an old page would get a 404 for the new file rather than its own text. The recoverable state would be needed all the same. And a copy from the cache would still have to say it is a copy. What would change instead is the address of a published file, its budget in scripts/budgets.json, the worker’s shell and the tests that rely on it. This change costs the budgets little: /sw.js grew by 129 bytes to 3,565 of 4,096, and data.json did not change by a byte.
What is not checked
Checked in Chromium through Playwright: both new tests, the whole of pwa.spec.ts and atlas.spec.ts, and verify:code. Real Android and iOS, Safari and Firefox were not checked. Nor was the audit’s own scenario reproduced, where the page is still controlled by the build before’s worker. That worker does not mark its copy, so no copy line appears. But its copy carries another stamp than the new page, and the card should move to “Open the page again” rather than show the old verification. That follows from the code; no test proves it.
Entry written September 27, 2026
Commits this entry accounts for
0469223