Re: [Web Timing] Getting root timings to recommendation

On Wed, Sep 22, 2010 at 1:47 AM, Sigbjørn Vik <> wrote:

> On Wed, 22 Sep 2010 10:19:25 +0200, Zhiheng Wang <>
> wrote:
>  On Thu, Sep 16, 2010 at 3:09 AM, Sigbjørn Vik <> wrote:
>  Does domainLookupStart need a clarification that if DNS lookup was started
>>> before fetchStart (in the case of DNS prefetching), domainLookupStart
>>> should
>>> still be set to fetchStart?
>> Make sense. Out of curiosity, how does the user agent prefetch a DNS for
>> the root page before the fetch? Part of the fetching processing is to
>> formulate the address of the resource.
>> I can only imagine the user agent prefetch DNS for embedded links/elements
>> on the current page.
> There are multiple ways DNS could be prefetched. Hovering a regular link to
> a new domain might trigger a DNS prefetch. The parser might request DNS as
> soon as it hits a URL, even before the code has been parsed to the point
> where it can be decided whether the resource needs to be fetched or not.
> Some ways can also happen in a blank, new tab: Highlighting or showing
> domains in the address bar history completion dropdown. DNS might randomly
> be requested immediately before a request due to autorenewal when the
> pinning expires, or by some unrelated action, e.g. a background RSS fetch,
> or another open tab requesting a new resource. Opening a bookmark folder,
> where two or more of the bookmarks have the same domain, or manually opening
> two tabs for the same domain very quickly. When starting with many open
> tabs, the user agent might prefetch DNS while parsing the saved tabs file,
> before starting to load the tabs.
> In all cases, there might be an ongoing DNS request for the domain in
> question at the time when the fetch process is actually started.

     Thanks for clarifying. Some of the prefetching cases here are done by a
previous navigation so the current one should act like getting
the cached version, especially when the prefetch is done before the
navigation start.

     On the other hand, what a browser does if there is already an ongoing
DNS request while it needs to lookup the same domain again?
Would it go ahead with a new request or would it just wait? What if the
prefetch is initiated by third-party plug-ins?
I saw this question before but not sure about the answer to it.


> In addition, if all sockets are in use, the user agent might prefetch DNS
> while waiting for an empty socket (though in this case, domainLookupStart
> does start after fetchStart, so that might not be relevant).

> --
> Sigbjørn Vik
> Quality Assurance
> Opera Software

Received on Thursday, 23 September 2010 22:45:55 UTC