At the Velocity New York conference, I learnt about resource hints using the tag. I was trying to check this on a test site. When I test the sample page on WebPageTest, I don’t see the preconnect or DNS prefetch kicking in.
Is there some kind of a heuristic that prevents the resource hint from being considered?
Here’s my WPT result:
I was searching through the forum posts and found this interesting. In an old post (http://www.webpagetest.org/forums/showthread.php?tid=12382), there is a reference to a site that had “dns-prefetch” resource hint enabled. I checked the site and it still has the same code.
However, when I re-run the test, DNS prefetching failed:
Since this test was in IE, I switched the browser and ran a test on Chrome. Prefetch failed here as well:
Now I am confused if this feature has changed in some way and hence fails to work on WPT across the browsers.
I figured out that the WPT I had already showed a preconnect. After speaking to a few others, I realized that the site I am using has so few resourced and all of them statically referenced that preconnect may not help since browser may have discovered the links normally. I tried on another site and it has worked as expected. So I am good.