Page MenuHomePhabricator

MediaViewer can show cached old versions of images
Closed, DuplicatePublic

Description

Steps to reproduce:

  • upload a file to Commons
  • add file to a page in a different wiki and open it in MediaViewer
  • upload a new version on Commons
  • refresh the page, open the image in MediaViewer again

You will see the old image in MediaViewer.

(reported by Dan Garry)

Caching is important but this could be really problematic in some situations (e.g. image vandalism). At the very least we should track it.

Event Timeline

Tgr raised the priority of this task from to Needs Triage.
Tgr updated the task description. (Show Details)
Tgr added projects: MediaViewer, Multimedia.
Tgr changed Security from none to None.
Tgr added subscribers: Tgr, Deskana.

On second thought, I do not understand why this happens. I thought it is some side effect of the CORS trickery we do to get nice loading bars and performance metrics, but the actual thumbnail displayed by MediaViewer is created normally via an <img> tag and should have the exact same caching headers an article thumbnail does. So even if the AJAX request for the image is cached, the <img> that is displayed should not be.

Dan, do you remember the browser/OS you used?

In T78745#852378, @Tgr wrote:

On second thought, I do not understand why this happens. I thought it is some side effect of the CORS trickery we do to get nice loading bars and performance metrics, but the actual thumbnail displayed by MediaViewer is created normally via an <img> tag and should have the exact same caching headers an article thumbnail does. So even if the AJAX request for the image is cached, the <img> that is displayed should not be.

We have ongoing issues with browser caching causing old image versions being shown for normal images on file description pages/articles.

In T78745#852378, @Tgr wrote:

On second thought, I do not understand why this happens. I thought it is some side effect of the CORS trickery we do to get nice loading bars and performance metrics, but the actual thumbnail displayed by MediaViewer is created normally via an <img> tag and should have the exact same caching headers an article thumbnail does. So even if the AJAX request for the image is cached, the <img> that is displayed should not be.

We have ongoing issues with browser caching causing old image versions being shown for normal images on file description pages/articles.

Is there a task for that? A mailing list thread?