Re: Do we need the restrictions on the <base> element?

On Wed, 06 Jun 2007 18:33:51 +0200, Boris Zbarsky <bzbarsky@MIT.EDU> wrote:
>> All major browsers will use the *last* <base> while the spec says they  
>> should ignore all but the *first*.
>
> Yep.  That will probably need to be changed in the spec.  Sites  
> definitely depend on this behavior; I don't think we could implement the  
> spec as written in Gecko without breaking things.
>
> In fact, current behavior in Gecko (needed for website compat, in our  
> experience, but I'd be interested in learning what other UAs do) is that  
> the last <base> inside <head> ends up setting the base URI for the  
> document, with nodes in <head> using whatever base URI is current when  
> they are parsed.  <base> tags inside the <body> end up affecting the  
> base URIs of individual nodes (all the ones parsed after that <base>),  
> but NOT the base URI of the document.

Note that Internet Explorer 7 would break those things. It _always_ uses  
the first <base> element in the <head> element. And that's it. I wonder  
how much content is affected.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Wednesday, 6 June 2007 16:52:26 UTC