W3C home > Mailing lists > Public > public-web-perf@w3.org > September 2010

Re: [Web Timing] Getting root timings to recommendation

From: Zhiheng Wang <zhihengw@google.com>
Date: Thu, 23 Sep 2010 15:44:58 -0700
Message-ID: <AANLkTi=G9YR5gSaHsOrBcFkeWpQK7DAUZ6t0iNNm2bz-@mail.gmail.com>
To: Sigbjørn Vik <sigbjorn@opera.com>
Cc: "public-web-perf@w3.org" <public-web-perf@w3.org>
On Wed, Sep 22, 2010 at 1:47 AM, Sigbjørn Vik <sigbjorn@opera.com> wrote:

> On Wed, 22 Sep 2010 10:19:25 +0200, Zhiheng Wang <zhihengw@google.com>
> wrote:
>
>  On Thu, Sep 16, 2010 at 3:09 AM, Sigbjørn Vik <sigbjorn@opera.com> 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.

cheers,
Zhiheng




>
> 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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:04:29 UTC