[Webkit-unassigned] [Bug 30303] <img src=""> requests main document resource unnecessarily

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 13 08:59:36 PDT 2009


Alexey Proskuryakov <ap at webkit.org> changed:

           What    |Removed                     |Added
           Severity|Major                       |Minor
         OS/Version|Mac OS X 10.4               |All
     Ever Confirmed|0                           |1
            Summary|Auto page reload when an    |<img src=""> requests main
                   |image is missing            |document resource
                   |                            |unnecessarily
           Platform|Macintosh                   |All
             Status|UNCONFIRMED                 |NEW
           Priority|P2                          |P3

--- Comment #7 from Alexey Proskuryakov <ap at webkit.org>  2009-10-13 08:59:36 PDT ---
Thank you for the nice test case, I see the issue now.

Here is what happens: <img src=""> has a relative source which resolves to main
document's URL for loading. This is in accordance with normal relative URL
resolution rules, and this is the same in Firefox, for example. You can check
images[0].src from JavaScript or from Web Inspector/Firebug to see this.

So, a document whose URL is "" contains an
image with an identical URL, "". Naturally,
the browser tries to load it, and then image decoding fails, because it's
actually HTML, and not any image type.

I do not think that Safari/WebKit behavior is buggy in any way - it just does
what the author asked for. But Firefox seems to have an optimization that
prevents this attempt to load main resource as an image, and it probably
wouldn't hurt to add such an optimization to WebKit. We should check how this
works for other types of resources, such as CSS stylesheets.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list