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

Re: Hoisting <base> into <head>

From: Anne van Kesteren <annevk@opera.com>
Date: Tue, 07 Sep 2010 23:26:00 +0200
To: "Boris Zbarsky" <bzbarsky@mit.edu>
Cc: "Jonas Sicking" <jonas@sicking.cc>, "Adam Barth" <w3c@adambarth.com>, "Henri Sivonen" <hsivonen@iki.fi>, public-html <public-html@w3.org>
Message-ID: <op.violtjet64w2qv@anne-van-kesterens-macbook-pro.local>
On Tue, 07 Sep 2010 23:14:31 +0200, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 9/7/10 5:09 PM, Anne van Kesteren wrote:
>> On Tue, 07 Sep 2010 23:03:58 +0200, Adam Barth <w3c@adambarth.com>  
>> wrote:
>>> It seems like the easiest solution is just to allow <base> elements
>>> outside of <head> to override the base URL.
>>
>> Yeah, I thought that would be better too. Just use the first <base>
>> element in the Document. That would also be more similar to how e.g.
>> <title> works and would allow for XML documents not using <head> etc.
>
> This has issues with <base> being injected into the body suddenly  
> affecting where scripts load from, no?

That should be no different from

<head>
  <script src=foo></script>
  <base href=http://example.org/>
  <script src=bar></script>
</head>

today. I.e. the second is fetched from http://example.org/bar and the  
first is just relative to the current document URL.


-- 
Anne van Kesteren
http://annevankesteren.nl/
Received on Tuesday, 7 September 2010 21:26:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:17:14 GMT