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

On 4 Jun 2007, at 01:56, Magnus Kristiansen wrote:

>> And finally: Why must the <base> element occur only "In a head  
>> element, after the meta element with the charset attribute, if  
>> any, but before any other elements"? Does the sequencing of the  
>> elements in <head> really matter?
>
> UAs will naturally have to handle other orderings, but the sequence  
> given above is the optimal one. The charset is first, so as few  
> bytes as possible have to be parsed twice. Base is next, because it  
> affects the location of external resources like stylesheets and  
> scripts. By getting the base as soon as possible, there are no  
> chances of having to restart a fetch, or having to delay fetching  
> until you're sure you have the final address.

OK. I can see that the current sequence is optimal for UA's. But if  
this is the only reason, I think its time to apply the "users over  
authors over implementors ..." design principle and simplify the  
spec. The gain must be absolutely minimal:

What is the actual real time delay caused by parsing the entire  
<head> before one starts fetching?

What's the actual cost in terms of CPU time of parsing the <head> twice?

Since this change made it through the scrutiny of the WHATWG, there  
must be a better use case (with research) than this.

--
Henrik Dvergsdal

Received on Monday, 4 June 2007 07:54:28 UTC