Open Bug 1070779 Opened 10 years ago Updated 2 years ago

Firefox requests single file multiple times in one page

Categories

(Core :: Graphics: ImageLib, defect)

36 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: aneesiqbalbhatti, Unassigned)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36

Steps to reproduce:

I have multiple image sources that point to the same link, but have #{unique_slug} at the end. I am using the slug to show different images from one svg file. it's a css-sprites like trick in svgs. Only the svg element with the id you give is shown, all others are hidden.


Actual results:

It requests the same file more than 10 times in a single page load.


Expected results:

It should have loaded the file just one time and showed it in all places.
Imagelib needs to use the url-without-ref as the cache key or something, assuming we want this behavior.

I say assuming, because there is no spec I can see which has this as a requirement at the moment.  Probably needs a spec issue raised on HTML as well.
Component: General → ImageLib
OS: Linux → All
Hardware: x86_64 → All
Bump
Version: 32 Branch → 36 Branch
Could you provide a testcase or public URL to reproduce the problem?
Flags: needinfo?(aneesiqbalbhatti)
If you visit [this][1] Pen URL in the latest Firefox, You'll see icons.svg being downloaded multiple times.

[1]:http://codepen.io/anon/pen/pvRybV
Flags: needinfo?(aneesiqbalbhatti)
Depends on: 1118926
Note that this is actually by design, to support the way that the -moz-resolution media fragment works. We are planning to rip that out very soon, probably in the Firefox 38 timeframe, and that will eliminate this issue as well.
(In reply to Boris Zbarsky [:bz] from comment #1)
> Imagelib needs to use the url-without-ref as the cache key or something,
> assuming we want this behavior.
> 
> I say assuming, because there is no spec I can see which has this as a
> requirement at the moment.  Probably needs a spec issue raised on HTML as
> well.

We definitely do want this behavior, because otherwise using spatial media fragments (#xywh) for things like sprite sheets will be so inefficient that nobody will want to do it.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: