W3C home > Mailing lists > Public > public-html-comments@w3.org > April 2010

base element and relative references

From: Erik van der Poel <erikv@google.com>
Date: Sat, 17 Apr 2010 12:00:02 -0700
Message-ID: <v2xc07a32651004171200r32af28f6wbcb09da695855a18@mail.gmail.com>
To: public-html-comments@w3.org
Hi all,

I tested relative references in the base element in a few browsers and
got different results. Suppose the following file is at

<base href="google.com/foo/">
<a href="bar.html">link</a>

When you click on the link, MSIE tries http://google.com/foo/bar.html

Firefox tries http://example.com/bar.html

Chrome and Opera try http://example.com/google.com/foo/bar.html

On the other hand, when the file does not contain a base element:

<a href="google.com/foo/">link</a>

MSIE, Firefox and Chrome all try http://example.com/google.com/foo/

So these browsers are consistent when the relative reference is in an
<a> element, but in the <base> element, their behavior is quite
different. The HTML 5 spec seems to indicate that the href in a base
element can be a relative reference.

Was this decided with or without the knowledge of the browser
behavior? Is there a record of which parts of the HTML 5 spec are
based on browser test results?


Received on Saturday, 17 April 2010 19:00:32 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:26:26 UTC