Page MenuHomePhabricator

MediaWiki sometimes displays old image revision despite purge and hard refresh
Closed, DeclinedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

  • 2nd newest version (version with watermark in bottom left corner) is displayed

What should have happened instead?:

  • Newest version (without watermark in bottom left corner) should be displayed

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

I'm still getting it 24 hours later. Tried a hard refresh and a purge again, didn't fix. Based on Aklapper's comment, is clearly not affecting all users or is intermittent.

image.png (937×1 px, 1 MB)

P.S. @Aklapper can you help with tags? I have no idea what to tag this. Thanks in advance.

Novem_Linguae renamed this task from Mediawiki file page sometimes displays old image revision to Mediawiki sometimes displays old image revision.Sep 11 2022, 7:50 PM
Novem_Linguae renamed this task from Mediawiki sometimes displays old image revision to Mediawiki sometimes displays old image revision despite purge and hard refresh.Sep 11 2022, 8:01 PM

@Novem_Linguae Devs will probably appreciate if you can post here the HTTP response headers from the image, which will give more details like which server is serving the stale image.

  1. Copy the link of the image (usually from the context menu)
  2. Open a new private browser window
  3. Hit F12 to open the developer console, and go to the network tab
  4. Paste the URL of the image in the address bar and hit enter
  5. If the image is still displaying the watermarked version, click on the item in the network tab that corresponds to that request (it should be the first one), and a details panel should appear, with the request and response headers.
  6. Select and copy the response headers. The panel may have an option to display them "in raw format"; If that's available, copy that. Some browsers also provide an option to copy the response headers directly from the context menu of the request.
  7. Paste the contents here

Unable to reproduce in incognito using the direct image URL. I tried each one about 20 times.

https://commons.wikimedia.org/wiki/File:Deception_Pass_bridge.jpg won't glitch for me when I visit the image URL directly. And on the parent page, it has now switched to mostly not displaying the watermark, although I did see it one time after a hard refresh.

https://en.wikipedia.org/w/index.php?title=User:FormalDude/Sidebar&oldid=1109585272 is still glitching for me (showing the version with a black circle border) when I visit that link, but not when I visit the image directly. The header info for this one not in incognito and not on the dedicated image page is:

image.png (1×1 px, 302 KB)

There's 3 possible images in the network tab. Strangely their "Preview" is the new image, not the old image.

image.png (426×1 px, 59 KB)

160px-FD_icon_logo.png:

Request URL: https://upload.wikimedia.org/wikipedia/commons/thumb/f/f5/FD_icon_logo.png/160px-FD_icon_logo.png
Request Method: GET
Status Code: 200 
Remote Address: 198.35.26.112:443
Referrer Policy: origin-when-cross-origin
accept-ch: Sec-CH-UA-Arch,Sec-CH-UA-Bitness,Sec-CH-UA-Full-Version-List,Sec-CH-UA-Model,Sec-CH-UA-Platform-Version
accept-ranges: bytes
access-control-allow-origin: *
access-control-expose-headers: Age, Date, Content-Length, Content-Range, X-Content-Duration, X-Cache
age: 83607
content-disposition: inline;filename*=UTF-8''FD_icon_logo.png
content-length: 9966
content-type: image/png
date: Sat, 10 Sep 2022 21:03:28 GMT
etag: 4b4a5168e4b08fc3a8277866b382d03a
last-modified: Tue, 06 Sep 2022 13:55:59 GMT
nel: { "report_to": "wm_nel", "max_age": 86400, "failure_fraction": 0.05, "success_fraction": 0.0}
permissions-policy: interest-cohort=(),ch-ua-arch=(self "intake-analytics.wikimedia.org"),ch-ua-bitness=(self "intake-analytics.wikimedia.org"),ch-ua-full-version-list=(self "intake-analytics.wikimedia.org"),ch-ua-model=(self "intake-analytics.wikimedia.org"),ch-ua-platform-version=(self "intake-analytics.wikimedia.org")
report-to: { "group": "wm_nel", "max_age": 86400, "endpoints": [{ "url": "https://intake-logging.wikimedia.org/v1/events?stream=w3c.reportingapi.network_error&schema_uri=/w3c/reportingapi/network_error/1.0.0" }] }
server: ATS/8.0.8
server-timing: cache;desc="hit-front", host;desc="cp4033"
strict-transport-security: max-age=106384710; includeSubDomains; preload
timing-allow-origin: *
x-cache: cp4033 hit, cp4033 hit/32
x-cache-status: hit-front
x-client-ip: [redacted]
:authority: upload.wikimedia.org
:method: GET
:path: /wikipedia/commons/thumb/f/f5/FD_icon_logo.png/160px-FD_icon_logo.png
:scheme: https
accept: image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8
accept-encoding: gzip, deflate, br
accept-language: en-US,en;q=0.9
cookie: logged_out_marketing_header_id=eyJfcmFpbHMiOnsibWVzc2FnZSI6IkltTTRZelkzWXpjekxUWmxaRGt0TkdKa05DMDROemN3TFRnNFpqQTRORGhqTURRMU1TST0iLCJleHAiOm51bGwsInB1ciI6ImNvb2tpZS5sb2dnZWRfb3V0X21hcmtldGluZ19oZWFkZXJfaWQifX0%3D--97c98ffe90fef1c0c94b968d19943f19226a8df2
if-modified-since: Tue, 06 Sep 2022 13:55:59 GMT
if-none-match: 4b4a5168e4b08fc3a8277866b382d03a
referer: https://en.wikipedia.org/
sec-ch-ua: "Chromium";v="104", " Not A;Brand";v="99", "Google Chrome";v="104"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Windows"
sec-fetch-dest: image
sec-fetch-mode: no-cors
sec-fetch-site: cross-site
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36

200px-FD_icon_logo.png

Request URL: https://upload.wikimedia.org/wikipedia/commons/thumb/f/f5/FD_icon_logo.png/200px-FD_icon_logo.png
Request Method: GET
Status Code: 200  (from disk cache)
Remote Address: 198.35.26.112:443
Referrer Policy: origin-when-cross-origin
accept-ch: Sec-CH-UA-Arch,Sec-CH-UA-Bitness,Sec-CH-UA-Full-Version-List,Sec-CH-UA-Model,Sec-CH-UA-Platform-Version
accept-ranges: bytes
access-control-allow-origin: *
access-control-expose-headers: Age, Date, Content-Length, Content-Range, X-Content-Duration, X-Cache
age: 0
content-disposition: inline;filename*=UTF-8''FD_icon_logo.png
content-length: 12538
content-type: image/png
date: Sun, 11 Sep 2022 20:12:07 GMT
etag: 1243ea6310822560aeb5491d7e59416e
last-modified: Tue, 06 Sep 2022 13:56:21 GMT
nel: { "report_to": "wm_nel", "max_age": 86400, "failure_fraction": 0.05, "success_fraction": 0.0}
permissions-policy: interest-cohort=(),ch-ua-arch=(self "intake-analytics.wikimedia.org"),ch-ua-bitness=(self "intake-analytics.wikimedia.org"),ch-ua-full-version-list=(self "intake-analytics.wikimedia.org"),ch-ua-model=(self "intake-analytics.wikimedia.org"),ch-ua-platform-version=(self "intake-analytics.wikimedia.org")
report-to: { "group": "wm_nel", "max_age": 86400, "endpoints": [{ "url": "https://intake-logging.wikimedia.org/v1/events?stream=w3c.reportingapi.network_error&schema_uri=/w3c/reportingapi/network_error/1.0.0" }] }
server: ATS/8.0.8
server-timing: cache;desc="hit-local", host;desc="cp4033"
timing-allow-origin: *
x-cache: cp4025 hit, cp4033 miss
x-cache-status: hit-local
x-client-ip: [redacted]

200px-FD_icon_logo.png

Request URL: https://upload.wikimedia.org/wikipedia/commons/thumb/f/f5/FD_icon_logo.png/200px-FD_icon_logo.png
Request Method: GET
Status Code: 200  (from disk cache)
Remote Address: 198.35.26.112:443
Referrer Policy: origin-when-cross-origin
accept-ch: Sec-CH-UA-Arch,Sec-CH-UA-Bitness,Sec-CH-UA-Full-Version-List,Sec-CH-UA-Model,Sec-CH-UA-Platform-Version
accept-ranges: bytes
access-control-allow-origin: *
access-control-expose-headers: Age, Date, Content-Length, Content-Range, X-Content-Duration, X-Cache
age: 0
content-disposition: inline;filename*=UTF-8''FD_icon_logo.png
content-length: 12538
content-type: image/png
date: Sun, 11 Sep 2022 20:12:07 GMT
etag: 1243ea6310822560aeb5491d7e59416e
last-modified: Tue, 06 Sep 2022 13:56:21 GMT
nel: { "report_to": "wm_nel", "max_age": 86400, "failure_fraction": 0.05, "success_fraction": 0.0}
permissions-policy: interest-cohort=(),ch-ua-arch=(self "intake-analytics.wikimedia.org"),ch-ua-bitness=(self "intake-analytics.wikimedia.org"),ch-ua-full-version-list=(self "intake-analytics.wikimedia.org"),ch-ua-model=(self "intake-analytics.wikimedia.org"),ch-ua-platform-version=(self "intake-analytics.wikimedia.org")
report-to: { "group": "wm_nel", "max_age": 86400, "endpoints": [{ "url": "https://intake-logging.wikimedia.org/v1/events?stream=w3c.reportingapi.network_error&schema_uri=/w3c/reportingapi/network_error/1.0.0" }] }
server: ATS/8.0.8
server-timing: cache;desc="hit-local", host;desc="cp4033"
timing-allow-origin: *
x-cache: cp4025 hit, cp4033 miss
x-cache-status: hit-local
x-client-ip: [redacted]

I note there's no Cache-Control: response header, which means the browser has freedom to cache the images. This looks like a duplicate of T19577: Thumbnail urls should be versioned and sent with Expires headers

Krinkle renamed this task from Mediawiki sometimes displays old image revision despite purge and hard refresh to MediaWiki sometimes displays old image revision despite purge and hard refresh.Sep 27 2022, 6:34 PM
Krinkle removed a project: MediaWiki-General.
Krinkle subscribed.

I'm triaging this as as task in MediaWiki-Core-HTTP-Cache.

The details provided were very useful! Thanks @Novem_Linguae.

From the task description:

Purging doesn't fix. Ctrl-F5 in Chrome doesn't fix.

This suggests it is not a browser caching issue. As such, the point by @Ciencia_Al_Poder does not apply, I think. It is true that when there is no Cache-Control header at all, browsers will permit themselves a little caching. However this is a fairly weak and short-lived signal. It's only the explicit strength of Cache-Control: immutable afaik that will make a browser use its cache during a user-requested refresh.

I suspect what happened here is that a purge event may have missed delivery to the caching data center near you, hence it didn't affect others. A MediaWIki action=purge would mitigate that. Unless there is a more widespread or reproducible issue, I don't see anything we can do here beyond inactionable speculation. Declining as such. Please feel free to re-open or file anew if you see it again.

action=purge didn't work for me at the time.

I'll bookmark this and re-open it if I see it again. It's very intermittent but I remember multiple instances of it spread out over a long period of time.