Bug with DNS request times for Firefox?

Hi Pat,

Firefox offers DNS prefetching since FF3.5:

As a matter of fact the DNS for all links in the source code should be automatically prefetched.

Please have a look at the test detail of www.finanznachrichten.de in this report: http://www.webpagetest.org/result/130821_X1_FVX/1/details/

There are 44 ms for a DNS lookup for http://fns1.de or 4 ms for a DNS lookup for http://js.revsci.net or 39 ms for http://www.google-analytics.com … although these should be prefetched automatically according to the info on the Mozilla website.

So, the question is now:
Does the DNS prefetching of FF work and as a matter of fact there are no (additional) DNS lookup times or where do these times come from?

It is going to depend - the look-ahead parser needs to kick in and then it depends on how it prioritizes the pre-resolves vs other network fetches (all browsers have it these days) and only applies to resources in the html (not javascript). If you look at request 68 you’ll see the DNS resolution happened a fair bit before the actual request so it is working, just maybe not as effective as you might hope.

Request #68 is strange as the DNS lookup has already been in request #42 … so that shouldn’t be a second time …

And if I understand you correctly, the browsers only do the DNS prefetching for HTML files, but not for the (plenty) of other files, like .js?

Sorry, the browsers scan the HTML content and should do a pre-resolve for anything that they can discover while scanning the html (js resources included). They can’t see any domains that are a result of js code executing though (like anything that happens as a result of including the twitter code for example).

OK, thanks Pat.

I just redid the test with the same server in Germany (that might have some problems with DNS lookups) and it’s clear to see now that it is doing DNS prefetching:

http://www.webpagetest.org/result/130825_6W_QYD/1/details/

In this comparison it is good to see that the DNS is pre-loaded:
http://www.webpagetest.org/result/130822_MZ_NQ4/1/details/
vs.
http://www.webpagetest.org/result/130825_6X_R1W/1/details/

The big question will be finally:
Will it have a positive effect? I am curious to see in the next few weeks if it is the case …