Mobile app version of vmapp.org
Login or Join
Murphy175

: PageSpeed - Minimize DNS lookups: why not use IP address for resources One of the recommendations from web performance optimization services is to minimize DNS look ups. I fully understand why

@Murphy175

Posted in: #Dns #IpAddress #PageSpeed #Performance

One of the recommendations from web performance optimization services is to minimize DNS look ups.

I fully understand why they recommend this but why not just point references to external files to the IP address?

For example:

<script src="//555.555.55.55/cdn/jquery.min.js"></script>


I have never seen this done, and my searches here came up empty, why not?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Murphy175

1 Comments

Sorted by latest first Latest Oldest Best

 

@Nimeshi995

Just to clarify the question to prevent confusion: It's advised by Google to reduce the number of lookups for unique hostnames - see: Minimize DNS lookups

As indicated there, hostnames are cached in the client's browser and OS. Using an IP address instead of a hostname for files hosted on the same host would therefore not be of benefit.

For files hosted elsewhere, you shouldn't use an IP address because they can change, whereas hostnames will not. For files hosted on a CDN like jQuery, a range of IP addresses will most certainly be used for redundancy, load balancing, etc... Reaching a busy server or incorrect IP address would result in any code running the library to no longer function.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme