Closed Bug 1314607 Opened 8 years ago Closed 8 years ago

Firefox sends redundant image requests for same file

Categories

(Core :: Graphics: ImageLib, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1121693
Tracking Status
firefox52 --- affected

People

(Reporter: xidorn, Unassigned)

Details

Attachments

(1 file)

If you have a style which includes several images with different fragment, Firefox would send multiple requests for them, although only one is necessary.

For example, if I have a style like:
> #obj1 { background-image: url(objs.svg#obj1); }
> #obj2 { background-image: url(objs.svg#obj2); }
> #obj3 { background-image: url(objs.svg#obj3); }
> #obj4 { background-image: url(objs.svg#obj4); }

Firefox would send four requests for objs.svg, while other browsers would only send one.
Attached file testcase
To reproduce:
1. open the testcase attached
2. open the network panel in devtools
3. force reload the page

Expected result:
there is only one request to test.svg

Actual result:
there are four requests to test.svg

(There is no test.svg available, so they are 404. But it happens no matter whether the file exists.)
I'll take a look, but later.
Assignee: nobody → honzab.moz
Status: NEW → UNCONFIRMED
Ever confirmed: false
Whiteboard: [necko-active]
If this is a bug, it's either in the css parser or image loader.

The image load(s) starts at:

>	xul.dll!imgLoader::LoadImage(0x057b9280, 0x057b88c0, 0x057b88c0, RP_No_Referrer_When_Downgrade, 0x05638640, 0x1dea20c0, 0x00000000, 0x0155e800, 0x0155e800, 0x00000000, 0x00000000, 0x00000025, {...}, 0x00fbe4c8) Line 2214	C++
 	xul.dll!nsContentUtils::LoadImage(0x057b9280, 0x0155e800, 0x0155e800, 0x05638640, 0x057b88c0, RP_No_Referrer_When_Downgrade, 0x00000000, 0x00000000, {...}, 0x00fbe4c8, 0x00000025) Line 3297	C++
 	xul.dll!mozilla::css::ImageLoader::LoadImage(0x057b9280, 0x05638640, 0x057b88c0, 0x073d1060) Line 262	C++
 	xul.dll!mozilla::css::ImageValue::Initialize(0x0155e800) Line 2932	C++
 	xul.dll!mozilla::css::ImageValue::ImageValue(0x057b9280, 0x065c7700, 0x057b88c0, 0x057b88c0, 0x05638640, 0x0155e800) Line 2903	C++
 	xul.dll!nsCSSValue::StartImageLoad(0x0155e800) Line 816	C++
 	xul.dll!TryToStartImageLoadOnValue({...}, 0x0155e800, 0x06a520a0, eCSSProperty_background_image, false) Line 99	C++
 	xul.dll!TryToStartImageLoad({...}, 0x0155e800, 0x06a520a0, eCSSProperty_background_image, false) Line 143	C++
 	xul.dll!TryToStartImageLoad({...}, 0x0155e800, 0x06a520a0, eCSSProperty_background_image, false) Line 133	C++
 	xul.dll!MapSinglePropertyInto(eCSSProperty_background_image, 0x068d31c8, 0x00fbe660, 0x00fbe704) Line 186	C++
 	xul.dll!nsCSSCompressedDataBlock::MapRuleInfoInto(0x00fbe704) Line 333	C++
 	xul.dll!mozilla::css::Declaration::MapRuleInfoInto(0x00fbe704) Line 100	C++
 	xul.dll!nsRuleNode::WalkRuleTree(nsStyleStructID_Reset_Start, 0x06a520a0) Line 2486	C++

At that point the imgLoader::LoadImage method should coalesce the request.  I cannot find any specification that would say if we have to distinguish requests including the URL fragment or not.  It may well be specified we must.

Moving to imglib.
Assignee: honzab.moz → nobody
Component: Networking: Cache → ImageLib
Whiteboard: [necko-active]
I think bug 1121693 covers this.
I think this is actually a duplicate of that bug.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: