W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2010

[whatwg] Inconsistent behavior for empty-string URLs

From: Nicholas Zakas <nzakas@yahoo-inc.com>
Date: Thu, 7 Jan 2010 13:03:03 -0800
Message-ID: <4E45EC6AD219FD47AD1BC06E4EE3845D0443AF4A@SNV-EXVS09.ds.corp.yahoo.com>
I'm going to take a lack of response to this question as a "no". :)

Given the disparate browser implementations for dealing with empty
string URLs, it seems unlikely that anyone is relying upon the current
behaviors, so I'd like to suggest this change be added to HTML5:

For any <img>, <link>, <script>, <iframe>, <audio>, <video>, <audio>,
<object>, <embed>, <input>, <html manifest>, or <frame> tag that will
result in an automatic download of an external resource must ignore any
empty string URL and not download the external resource. This is true
even when a <base href> is applied to the page.

Does that sound right?

-Nicholas
 
______________________________________________
Commander Lock: "Damnit Morpheus, not everyone believes what you
believe!"
Morpheus: "My beliefs do not require them to."

-----Original Message-----
From: whatwg-bounces@lists.whatwg.org
[mailto:whatwg-bounces at lists.whatwg.org] On Behalf Of Nicholas Zakas
Sent: Tuesday, January 05, 2010 12:21 PM
To: Simon Pieters; Jonas Sicking
Cc: Maciej Stachowiak; whatwg at lists.whatwg.org; Aryeh Gregor
Subject: Re: [whatwg] Inconsistent behavior for empty-string URLs

Given all of this info, does anyone believe there's further
investigation necessary before making a recommendation for this change?

-Nicholas
 
______________________________________________
Commander Lock: "Damnit Morpheus, not everyone believes what you
believe!"
Morpheus: "My beliefs do not require them to."

-----Original Message-----
From: whatwg-bounces@lists.whatwg.org
[mailto:whatwg-bounces at lists.whatwg.org] On Behalf Of Simon Pieters
Sent: Tuesday, December 22, 2009 2:30 AM
To: Nicholas Zakas; Jonas Sicking
Cc: Maciej Stachowiak; whatwg at lists.whatwg.org; Aryeh Gregor
Subject: Re: [whatwg] Inconsistent behavior for empty-string URLs

On Mon, 21 Dec 2009 20:03:01 +0100, Nicholas Zakas
<nzakas at yahoo-inc.com>  
wrote:

> Here are the results of testing various tags with empty URLs across
> different browsers. The table below indicates how many requests are
sent
> when the given tag is encountered on the page (curiously, Firefox 3
> sometimes sends two extra requests). Even though the <link> tags don't
> show it in the table, they all had href="".
>
> 					IE7	IE8	FF3	FF3.5
> SF4	Ch3	Op10
> <img src="">			1	1	1	0	1
> 1	0
> <link rel="stylesheet">		0	0	1	1
1
> 1	0
> <link rel="icon">			0	0	2	1
> 1	1	0
> <link rel="shortcut icon">	0	0	2	1	1
> 1	0
> <link rel="prefetch">		0	0	2	0	0
> 0	0
> <script src="">			0	0	1	1
1
> 1	0
> <iframe src="">			0	0	0	0
0
> 0	0
> <input type="image" src="">	1	1	1	0	1
> 1	0
> <object data="">			0	0	1	1
> 0	0	0
> <embed src="">			0	0	0	0
0
> 0	0
> <html manifest="">		0	0	0	0	1
> 0	0
>
> For the most part, no two browsers act the same. Safari and Chrome are
> the closest (not surprising).
>
> Apply a base URL via <base> in all cases didn't change the results,
> except in IE, where it prevented the extra image request from being
> made.

Thanks. IIRC, IE doesn't make a request when using minimized attribute  
syntax, i.e. "<img src>" (because it drops the attribute during
parsing).

-- 
Simon Pieters
Opera Software
Received on Thursday, 7 January 2010 13:03:03 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:20 UTC