Open Bug 1997135 Opened 10 months ago Updated 10 months ago

CSS url() doesn't respect cache refresh

Categories

(Core :: CSS Parsing and Computation, defect)

Firefox 143
defect

Tracking

()

People

(Reporter: ossman, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:143.0) Gecko/20100101 Firefox/143.0

Steps to reproduce:

  1. Set background: url("foo.png"); on an element
  2. Load page
  3. Replace foo.png with a different image
  4. Reload page

Actual results:

Firefox shows the old contents of foo.png.

Expected results:

Firefox shows the updated contents of foo.png.

Having Developer Tools open and Disable Cache enabled doesn't do anything about the issue. You also don't see any attempt to load/refresh the image in the list of network requests.

Opening the image URL manually shows the correct image. But it doesn't overwrite the cache, so the html page still shows the old contents even after a refresh.

The oddest behaviour is that you can inspect the element, disable and enable the background entry, and get the correct contents to show up. But again, the cached contents isn't fixed so a refresh of the page restores the old data from this magical cache.

Attached file bgcache.html

Partial test case. Simply but any image called "background.png" in the same directory and load the page. Then remove "background.png" and put in a different image with the same filename. Then try to get Firefox to actually show that image.

Did you try shift+reload?

Also no effect.

I think I'm also seeing the bug on Firefox for Android, although I didn't investigate as deeply there.

The Bugbug bot thinks this bug should belong to the 'Core::CSS Parsing and Computation' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core

Hmm.. Confirming. Of all things, Shift+R should at least cause a full reload.
Not sure what component makes the caching decision exactly, but for now, keeping it on CSS side.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: