images with height but not width (or vice versa) are GET twice

RESOLVED FIXED

Status

()

Core
ImageLib
RESOLVED FIXED
17 years ago
17 years ago

People

(Reporter: John Morrison, Assigned: Stuart Parmenter)

Tracking

({perf})

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

17 years ago
On the first visit to that page, there are two duplicate, conditional
GETs of the same image; the duplicates are for the case where the width
or height is not the "natural" size of the image, and the corresponding
width/height is unspecified.

For this html, where the image is the same in each reference, but has a 
different name.

<html>
<body>
 
  <IMG SRC="w-no-h-no.gif"                          ><br>
  <IMG SRC="w-no-h-yes.gif"                height=58><br>
  <IMG SRC="w-yes-h-no.gif"      width=600          ><br>
  <IMG SRC="w-yes-h-yes.gif"     width=600 height=58><br>
 
  <IMG SRC="w-bogus-h-no.gif"    width=400          ><br>
  <IMG SRC="w-bogus-h-yes.gif"   width=400 height=58><br>
  <IMG SRC="w-no-h-bogus.gif"              height=400><br>
  <IMG SRC="w-yes-h-bogus.gif"   width=600 height=400><br>
  <IMG SRC="w-bogus-h-bogus.gif" width=400 height=400><br>
 
</body>
</html>


You get these duplicates on the intial load of the page:
 
      23:50:54 GET /case-one/document.html        200 565
      23:50:54 GET /case-one/w-no-h-no.gif        200 4518
      23:50:54 GET /case-one/w-no-h-yes.gif       200 4518
      23:50:54 GET /case-one/w-yes-h-no.gif       200 4518
      23:50:54 GET /case-one/w-yes-h-yes.gif      200 4518
      23:50:54 GET /case-one/w-bogus-h-no.gif     200 4518
      23:50:54 GET /case-one/w-bogus-h-yes.gif    200 4518
      23:50:54 GET /case-one/w-no-h-bogus.gif     200 4518
      23:50:54 GET /case-one/w-yes-h-bogus.gif    200 4518
      23:50:54 GET /case-one/w-bogus-h-bogus.gif  200 4518
DUP-> 23:50:54 GET /case-one/w-bogus-h-no.gif     304 -
DUP-> 23:50:55 GET /case-one/w-no-h-bogus.gif     304 -
 
 
A reload of that page (with pref set to once per session) gives this
(and note that there isn't a need to do a conditional GET at all, so 
none of these needs to happen).
 
      23:55:25 GET /case-one/document.html        304 -
??    23:55:26 GET /case-one/w-bogus-h-no.gif     304 -
??    23:55:26 GET /case-one/w-no-h-bogus.gif     304 -
DUP-> 23:55:26 GET /case-one/w-bogus-h-no.gif     304 -
DUP-> 23:55:26 GET /case-one/w-no-h-bogus.gif     304 -
 
 
A shift-reload of that page does this:
 
      23:57:47 /case-one/document.html            200 565
      23:57:47 /case-one/w-no-h-no.gif            304 -
      23:57:47 /case-one/w-no-h-yes.gif           304 -
      23:57:47 /case-one/w-yes-h-no.gif           304 -
      23:57:47 /case-one/w-yes-h-yes.gif          304 -
      23:57:47 /case-one/w-bogus-h-no.gif         304 -
      23:57:47 /case-one/w-bogus-h-yes.gif        304 -
      23:57:47 /case-one/w-no-h-bogus.gif         304 -
      23:57:47 /case-one/w-yes-h-bogus.gif        304 -
      23:57:47 /case-one/w-bogus-h-bogus.gif      304 -
DUP-> 23:57:47 /case-one/w-no-h-yes.gif           304 -
DUP-> 23:57:47 /case-one/w-yes-h-no.gif           304 -
DUP-> 23:57:47 /case-one/w-bogus-h-no.gif         304 -
DUP-> 23:57:47 /case-one/w-no-h-bogus.gif         304 -

----------------------------------------

If the images are animated, you get the same set of duplicate GETs, but in
this case, the duplicate transfers are 200 OK (e.g., 10KB instead of ~100B).
So, if an ad banner is mis-sized, this will cost the end user for the second
fetch (e.g., 2 or more seconds on a 56K connection).
(Reporter)

Updated

17 years ago
Keywords: mozilla0.9, perf
(Reporter)

Updated

17 years ago
Blocks: 71668
(Assignee)

Comment 1

17 years ago
This bug has been fixed by the new image library.
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.