NEW 74500
<img src="#"> requests main document resource unnecessarily
https://bugs.webkit.org/show_bug.cgi?id=74500
Summary <img src="#"> requests main document resource unnecessarily
Vsevolod Vlasov
Reported 2011-12-14 04:59:47 PST
Attachments
Alexey Proskuryakov
Comment 1 2011-12-14 08:45:35 PST
Empty URL is a special case in HTML5. We'll need new research for src="#", and a change in the spec if it's warranted. See <http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-December/024357.html> for a discussion that resulted in changing the spec for empty URLs. What do other browsers do?
Vsevolod Vlasov
Comment 2 2011-12-15 04:46:35 PST
I used following test cases: 1. <img src=""></img> 2. <img src="#"></img> 3. <img src="#test"></img> Opera 11 makes only one request (main document) in each case, so they are ignoring fragment and consider "#" an empty url. Firefox 3.6 makes one request in the first case and two in other cases. Firefox 8 makes two requests in each case (so they are making two requests for src="" again!) Chromium/Safari with ToT webkit make one request in the first case and two in other cases as we would expect.
Alexey Proskuryakov
Comment 3 2011-12-15 08:52:53 PST
> Firefox 8 makes two requests in each case (so they are making two requests for src="" again!) Please file a bugzilla.mozilla.org bug for them to fix. > Chromium/Safari with ToT webkit make one request in the first case and two in other cases as we would expect. Getting a spec change first is probably the best way to go about this. Would you be willing to e-mail WHATWG?
Ian 'Hixie' Hickson
Comment 4 2012-01-31 15:40:54 PST
How common is this? Unless it's really common (why would it be?) I'd suggest not doing anything special for the latter two cases. (src="" is common because it's the default value.)
Note You need to log in before you can comment on or make changes to this bug.