Inline SVG image render not being updated if you download original image first




3 years ago
a year ago


(Reporter: jmoudesluys, Unassigned)



43 Branch

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [gfx-noted])



3 years ago
User Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
Build ID: 20160105164030

Steps to reproduce:

We're using etags to validate cached images. We've noticed an issue specific to Firefox when viewing inline svg images after they've been updated.

1. Embed an svg image in a web page using an <img> tag.
2. Update svg file on the server.
3. Hit the image url directly. Etag validation fails, and the new version of the image is returned.
3. Now refresh the web page. The old version of the svg image is still shown.

Actual results:

Inline svg images are not updated. The cached version of the file is correct, but the rendered svg still shows the old version.

A hard refresh, or closing the browser, fixes the issue.

Expected results:

When the cached version of the svg file is updated, the inline version should update as well.

It's my understanding that a rasterized version of the rendered svg image is stored in the surface cache, so that it does not need to be re-rendered on every page view. It seems that hitting the image url directly is updating the file cache, but not invalidating the surface cache.
Component: Untriaged → SVG
Product: Firefox → Core
Component: SVG → ImageLib

Comment 1

3 years ago
Could you provide a live testcase (like a button to update a new svg file)?
Flags: needinfo?(jmoudesluys)


3 years ago
Keywords: testcase-wanted

Comment 2

3 years ago
Live test case:

Password: test123

1. Go to and sign in.
2. The SVG file is visible inline on this page, above the document listing.
3. In another tab, go to
4. Click 'select files form my computer' and upload a new svg file.
5. Click 'save'.
6. Immediately go to
7. Now reload the first page you visited:

You should see the old version of the image displayed on this page until you do a hard refresh.
Flags: needinfo?(jmoudesluys)

Comment 3

3 years ago
I'm able to reproduce the issue.
Do you know if it worked normally in the past with previous versions of Firefox? (FF40/38 e.g.)


3 years ago
Keywords: testcase-wanted → testcase
Whiteboard: [gfx-noted]
You need to log in before you can comment on or make changes to this bug.