Re: Implementing the web timing spec

Georg Maaß <[email protected]> Thu, 11 Mar 2010 10:36:54 +0100
Newsgroups gmane.comp.mozilla.devel.dom
Message-ID <[email protected]>
zhihengw wrote:
>      Enabling the interface, through HTTP header etc, sounds like a
> good idea at this time.
> For the root document though, it's already too late to populate some
> attributes (DNS, etc).
> So how about enabling the timing for the root document all the time
> but making the element timing
> configurable? The overhead of keeping the root document timings should
> be rather minimal.
>
> thanks,
> Zhiheng

What is the root document? Any HTTP response might say "I like to enable 
the interface". The browser then decides depending on the privacy rules 
of the user, whether to really enable the interface and which parts to 
expose and which not.

If a web application needs it, it will send that HTTP header in each 
(X)HTML page embedding scripts that like to use it. A web application 
does not need to test how long it takes to first time connect to that 
server within that session. This is the only thing which can not be 
measured, if the interface is activated after the response begins.

Usually a web application is interested in timing information during 
usage of the application not in timing information before starting it. 
Start of the application is, when the server received the incomming 
connection. The time from receiving the incoming connection until 
sending the first HTTP response header can be measured by the server, if 
it is interested in this timing information.