|Summary:||<img src="#"> requests main document resource unnecessarily|
|Product:||WebKit||Reporter:||Vsevolod Vlasov <vsevik>|
|Component:||Page Loading||Assignee:||Nobody <webkit-unassigned>|
|Severity:||Normal||CC:||ap, darin, ian, japhet, m.goleb+bugzilla|
|Version:||528+ (Nightly build)|
Description Vsevolod Vlasov 2011-12-14 04:59:47 PST
Looks like the fragment case was missed in https://bugs.webkit.org/show_bug.cgi?id=69211. Originally found in https://code.google.com/p/chromium/issues/detail?id=105535.
Comment 1 Alexey Proskuryakov 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?
Comment 2 Vsevolod Vlasov 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.
Comment 3 Alexey Proskuryakov 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?
Comment 4 Ian 'Hixie' Hickson 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.)