none
DNS Prefetching in IE RRS feed

  • Question

  • I  try to force DNS prefetching of specific hostnames using  IE9 and IE10, but i couldn't make it work. I added the following to my HTML page in the head section:

    <link rel="dns-prefetch" href="http://www.domain1.com"> <link rel="dns-prefetch" href="http://www.domain2.com">

    <!--[if IE 9]> <link rel="prefetch" href="http://www.domain1.com"> <link rel="prefetch" href="http:///www.domain2.com"> <![endif]-->


    I want to support both IE 9 and IE 10. I would like to ask:

    1. How can I check DNS lookup time using IE? 

    2. What should I do so it will work in IE 9 and 10?

    Thanks.


    • Edited by hminster Thursday, April 11, 2013 2:39 PM
    Thursday, April 11, 2013 1:15 PM

Answers

  • Can you give me a working example of DNS prefetch, with IE10, and explanation of how to validate it is working with IE10 dev tools? 

    Do you agree with my observation made with ProcMon?  If it is being done with UDP you won't be able to see it being done with DT.   Note that ProcMon only shows us the length of the query, so to see the actual query we would have to use NetMon (or WireShark).   I think that is good indication that the feature is doing a query and thus satisfying at least minimally an objective of the feature.  What I still don't know is whether the results of the query are cached (and thus used to avoid doing any further lookups for those hosts).  ProcMon shows that there is still a fair bit of DNS lookup activity being done after those which we are assuming were done as a result of the feature.   Unfortunately ProcMon doesn't give a clear indication of which host is being accessed for its HTTP requests so that makes it slightly difficult to draw any kind of proof about whether lookups precede them.   That's why I think using NetMon to do that should be the next step as a validation that the feature is doing something more than just doing an assumed "DNS-prefetch".

    Another proof that I can imagine would require knowing how to examine the existing DNS cache.  If we knew how to do that then I think that simply seeing lookups which were done using DNS-PREFETCH that way would be sufficient indication that they would be used by subsequent HTTP fetches without any further DNS queries.   That I imagine is the real objective of the feature.  Note that such an examination would have to be done before any of those host names could be used normally or the proof would be inconclusive.  So, I suppose putting a dummy name in could satisfy that requirement, if using breakpoints or something couldn't let it happen sooner.

     
    Robert
    ---

    Wednesday, April 17, 2013 4:08 PM
    Answerer

All replies

  • 1. How can I check DNS lookup time using IE? 

    2. What should I do so it will work in IE 9 and 10?

    Interesting topic.  

    http://blogs.msdn.com/b/ieinternals/archive/2012/03/01/ie10-beta-consumer-preview-minor-changes-changelist.aspx

    <quote>

    IE10 now supports LINK REL=dns-prefetch. In IE9, we only would perform DNS prefetch for LINK REL=prefetch as the dns-prefetch token was not yet defined.

    </quote>

    You seem to be doing what is required.   Are you sure it's not working?  

    FWIW I would imagine that using ProcMon's Network tab might give a clue about whether any "pre-fetch" DNS lookups were being done, especially if that would be the only way that they could be referenced.   Alternatively, NetMon would probably be better in terms of checking performance.  Note though that performance could be affected by various caching mechanisms so, in other cases, e.g. where prefetch was really meant to do something, it would probably be mostly a question of comparing the first non-cached instances with subsequent uses of them and knowing whether such mechanisms could still be in effect and if that mattered.   (I haven't seen a description of the feature's implementation.  E.g. if it would be related to the existing DNScacheTimeout, I guess you would only see one lookup being done?  Etc.)

    Do you have a publicly accessible example others could help you test?

     
    HTH

     
    Robert Aldwinckle
    ---

    Thursday, April 11, 2013 8:03 PM
    Answerer
  • Here is an example for www.amazon.com.

    The site's source include the following code:

        <meta http-equiv="x-dns-prefetch-control" content="on">
        <link rel="dns-prefetch" href="http://g-ecx.images-amazon.com">
        <link rel="dns-prefetch" href="http://z-ecx.images-amazon.com">
        <link rel="dns-prefetch" href="http://ecx.images-amazon.com">
        <link rel="dns-prefetch" href="http://completion.amazon.com">
        <link rel="dns-prefetch" href="http://fls-na.amazon.com">

    webpagetest.org results for Chrome: http://www.webpagetest.org/result/130414_GJ_e7b7d3d1cf6cf158d9a36822d2ac6b65/

    webpagetest.org results for Firefox: http://www.webpagetest.org/result/130414_E8_3a7ac5dd8e17231cdecef48d8cccc1e3/ 

    webpagetest.org results for IE10: http://www.webpagetest.org/result/130414_EC_116dffb9cce79afdca9db37704990ba3/ 

    In those results I can see a DNS prefetching in Chrome and Firefox but not in IE10.

    Thanks,


    Sunday, April 14, 2013 7:16 AM
  • Here is an example for www.amazon.com.

    Good example.   ProcMon shows that something is happening in IP6 UDP packets to port "Domain" which would probably be related to all 5--e.g. judging by the relative lengths of the href= values and the Lengths= given in the Detail field--41,41,39,39,35.   Wouldn't that be enough to constitute "DNS pre-fetching"?  Unfortunately I didn't think that I would have to have NetMon running too.  I'll have to try using it some time later. 

    BTW I tried using ipconfig /displaydns to see if anything had been cached but of course if just nslookups were done there wouldn't be.  So, as I mentioned in my earlier speculations, I think it depends on what IE does with the results from these queries whether they will have much effect.  E.g. if it saves them then presumably we should see fewer subsequent DNS queries.  Otherwise all it could possibly do is prime a downstream server to be more ready for a real request when it comes.

    webpagetest.org results

    Could the difference be that IE10 would be doing DNS-prefetch and the others are doing an actual file prefetch?

     
    Robert
    ---

    Sunday, April 14, 2013 5:27 PM
    Answerer

  • Can you give me a working example of DNS prefetch, with IE10, and explanation of how to validate it is working with IE10 dev tools? 

    Thanks

    Wednesday, April 17, 2013 2:13 PM
  • Can you give me a working example of DNS prefetch, with IE10, and explanation of how to validate it is working with IE10 dev tools? 

    Do you agree with my observation made with ProcMon?  If it is being done with UDP you won't be able to see it being done with DT.   Note that ProcMon only shows us the length of the query, so to see the actual query we would have to use NetMon (or WireShark).   I think that is good indication that the feature is doing a query and thus satisfying at least minimally an objective of the feature.  What I still don't know is whether the results of the query are cached (and thus used to avoid doing any further lookups for those hosts).  ProcMon shows that there is still a fair bit of DNS lookup activity being done after those which we are assuming were done as a result of the feature.   Unfortunately ProcMon doesn't give a clear indication of which host is being accessed for its HTTP requests so that makes it slightly difficult to draw any kind of proof about whether lookups precede them.   That's why I think using NetMon to do that should be the next step as a validation that the feature is doing something more than just doing an assumed "DNS-prefetch".

    Another proof that I can imagine would require knowing how to examine the existing DNS cache.  If we knew how to do that then I think that simply seeing lookups which were done using DNS-PREFETCH that way would be sufficient indication that they would be used by subsequent HTTP fetches without any further DNS queries.   That I imagine is the real objective of the feature.  Note that such an examination would have to be done before any of those host names could be used normally or the proof would be inconclusive.  So, I suppose putting a dummy name in could satisfy that requirement, if using breakpoints or something couldn't let it happen sooner.

     
    Robert
    ---

    Wednesday, April 17, 2013 4:08 PM
    Answerer