Multiple dns lookups
I just ran a load time analysis for a website. The results can be seen here:
http://gtmetrix.com/reports/www.parship.co.uk/VfLleffe
When you check the timeline you will see that some images have a dns lookup time and some do not. Even when the images are on the same subdomain some require a dns lookup and some do not.
Is this totally rando开发者_高级运维m? Or is there a way to prevent multiple dns lookups for the same subdomain?
Thanks...
That's a simple answer - if you reference the images in your html with the site's domain name it will trigger a DNS lookup.
This will not trigger a DNS lookup:
<img src="/logo.png" alt="Site Logo" />
This will trigger a DNS lookup:
<img src="http://www.mysite.com/logo.png" alt="Site Logo" />
精彩评论