W3C home > Mailing lists > Public > public-html@w3.org > June 2007

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

From: Henrik Dvergsdal <henrik.dvergsdal@hibo.no>
Date: Mon, 4 Jun 2007 09:54:10 +0200
Message-Id: <D28C6E32-098F-4D16-A76E-5EE56350F55D@hibo.no>
To: HTML WG <public-html@w3.org>


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

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:45 UTC