Closed
Bug 225554
Opened 21 years ago
Closed 16 years ago
page loaded twice if contains <img HEIGHT="5" WIDTH="100%" SRC=""> (empty src attribute)
Categories
(Core :: General, defect)
Core
General
Tracking
()
RESOLVED
DUPLICATE
of bug 444931
People
(Reporter: andry, Unassigned)
References
Details
(Keywords: perf)
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 Mozilla makes 2 HTTP GET requests for a dymamic page (non-cachable) which contains <img HEIGHT="5" WIDTH="100%" SRC="">. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Comment 1•21 years ago
|
||
Hmm why do you need an image with src="" ? I confirm that it resolves to the URL of the page with Mozilla 1.6a : 172.16.140.87 - - [13/Nov/2003:13:18:17 +0100] "GET /test.html HTTP/1.1" 200 43 172.16.140.87 - - [13/Nov/2003:13:18:17 +0100] "GET /test.html HTTP/1.1" 304 - With IE6 it resolves to the root of the web server : 172.16.140.87 - - [13/Nov/2003:13:18:51 +0100] "GET /test.html HTTP/1.1" 200 43 172.16.140.87 - - [13/Nov/2003:13:18:51 +0100] "GET / HTTP/1.1" 200 715
Reporter | ||
Comment 2•21 years ago
|
||
i think it would be best if Mozilla understand the image refers to the file already loaded. If a page contains several images referring to the same image file - only one hit will be made. So it seemed reasonable to avoid loading twice in my case. However, this was of cause a bug in my HTML
Severity: normal → minor
Comment 3•21 years ago
|
||
> i think it would be best if Mozilla understand the image refers to the file
> already loaded.
It does. But that's not cacheable, as you said, so we have to hit the server
every time we load it.
This is invalid.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
Comment 4•20 years ago
|
||
*** Bug 270866 has been marked as a duplicate of this bug. ***
Comment 5•20 years ago
|
||
if the image has no src then there is no image , why does the browser makes a request and not just skips it ?
Comment 6•20 years ago
|
||
src="" is not the same thing as "has no src". If you want no src, don't set the src attribute. Setting it to "" means "this URI".
Updated•20 years ago
|
Product: Browser → Seamonkey
Comment 7•19 years ago
|
||
*** Bug 284503 has been marked as a duplicate of this bug. ***
Comment 8•19 years ago
|
||
*** Bug 287077 has been marked as a duplicate of this bug. ***
Comment 9•19 years ago
|
||
In which case would an html page be it's own image content? This behavior is on mozilla only, IE just do nothing as expected.
Comment 10•19 years ago
|
||
*** Bug 286979 has been marked as a duplicate of this bug. ***
Updated•19 years ago
|
Summary: page loaded twice if contains <img HEIGHT="5" WIDTH="100%" SRC=""> → page loaded twice if contains <img HEIGHT="5" WIDTH="100%" SRC=""> (empty src attribute)
Comment 11•19 years ago
|
||
> In which case would an html page be it's own image content?
In any case that makes use of content negotiation, potentially. Such pages
exist out there as demonstrations of content negotiation, and they're broken in
IE (which does not endear IE to people who want to use the technology).
Comment 12•19 years ago
|
||
(In reply to comment #11) > > In which case would an html page be it's own image content? > > In any case that makes use of content negotiation, potentially. Such pages > exist out there as demonstrations of content negotiation, and they're broken in > IE (which does not endear IE to people who want to use the technology). In that case, the logical behavoir would be the browser to fetch src="" on document load, not on page reload / change. Ie: Logical: Load: 2 fetch, Change: 1 fetch Current: Load: 1 fetch, Change: 2 fetch
Comment 13•19 years ago
|
||
Testcase for the behavior in comment 12?
Comment 14•19 years ago
|
||
*** Bug 276287 has been marked as a duplicate of this bug. ***
Updated•19 years ago
|
Status: RESOLVED → VERIFIED
Comment 15•19 years ago
|
||
*** Bug 303624 has been marked as a duplicate of this bug. ***
Comment 16•19 years ago
|
||
*** Bug 320973 has been marked as a duplicate of this bug. ***
Comment 17•18 years ago
|
||
*** Bug 331107 has been marked as a duplicate of this bug. ***
Comment 18•18 years ago
|
||
*** Bug 349874 has been marked as a duplicate of this bug. ***
Comment 23•17 years ago
|
||
While I acknowledge that an empty URL isn't the same as no URL at all, and also that an empty URL is a relative URL, well, I still believe firefox's behavior is wrong. * Boris mentions content negotiation; but in my case (Bug 370675), the request is issued as: Accept image/png,*/*;q=0.5 How is that correct ? Shouldn't image/* be used ? If */* is acceptable, the server has no chance to handle the request correctly, does it ? * No other browser behaves like this. Apart from demo pages, I don't think anyone is depending on this behavior; on the other hand this mistake is a simple one to make and can cause real problems. I don't mean that standards don't matter, but probably we could get away with src="./" if we really want to reference the current URL ? Or something ? * Worst case, couldn't this be changed in quirks mode ?
Comment 24•17 years ago
|
||
> * No other browser behaves like this. Actually, IE sometimes does, as I recall. It's not consistent about it, but some sites broke when we had our old behavior (we used to ignore src="" altogether in all cases). If someone can figure out exactly what IE does, we should consider changing what we do. > Accept image/png,*/*;q=0.5 Sounds like people got overzealous about the Accept header. Probably worth a bug.
Comment 25•17 years ago
|
||
As for quirks mode, there doesn't seem to be much serious harm here even if the site doesn't expect this, so I'm not sure it's worth the complexity and developer mind-print of a quirk.
Comment 26•17 years ago
|
||
Well, I really don't know how complex this would be to implement or in fact f my concept of what a quirk is matches the reality. I had that idea because it seems to be the way browsers deal with those parts of the standards that tend to surprise most people :p Anyway, I do think it's potentially much more harmful than a wrongly computed font size: as somebody else pointed out in one of the duplicate bugs, users could end up buying something two times - all it takes is a site using GET instead of POST (and there's a lot of those) and an empty URL...
Comment 27•17 years ago
|
||
Sites that are using GET instead of POST are already screwed -- there are tons of ways for a GET to be performed multiple times transparently to the user without this issue intervening (network hiccups, <meta> tags, etc, etc).
Updated•17 years ago
|
OS: Linux → All
Product: Mozilla Application Suite → Core
Hardware: PC → All
Comment 39•16 years ago
|
||
Is this fixed by bug 444931 now?
Updated•16 years ago
|
Status: VERIFIED → RESOLVED
Closed: 21 years ago → 16 years ago
Resolution: INVALID → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•