Add file change timestamp to the file URI

Created on 15 September 2016, about 9 years ago
Updated 13 August 2025, 2 months ago

Problem/Motivation

In Crop API ( #2658268: Cache persistence after derivative creation ), we had a problem that file (image) doesn't update after cropping happens using Ajax. It happens because the browser already cached the image on the first request.

To tell the browser to create a new request (re-fetch the image) we had to add a query value to the file URI.
In the related issue, we are using cropping values for it.

As a more generic case, we could think of using something like file change timestamp (of file entity), as proposed in #20 and #21 to avoid browser caching.

Proposed resolution

Discuss directions if we need this feature in Core.

Feature request
Status

Postponed: needs info

Version

11.0 🔥

Component

file.module

Created by

Live updates comments and jobs are added and updated live.
  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States smustgrave

    Thank you for sharing your idea for improving Drupal.

    We are working to decide if this proposal meets the Criteria for evaluating proposed changes. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or there is no community support. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

  • 🇨🇭Switzerland berdir Switzerland

    I suppose we can close it as a duplicate of Add file change timestamp to the file URI Postponed: needs info , that's doing similar things.

Production build 0.71.5 2024