What's faster? Hot linking (inline linking) to an absolute URI or hosting the resource yourself and using a relative URI?
In his tutorial on how to style HTML5 elements in Internet Explorer, Remy Sharp states that hot linking causes an "extra HTTP [GET] request." I agree if you're comparing hot linking to copying & pasting (embedding) the script into the HTML. But, if you're comparing hot linking to hosting the script locally and linking via a relative path, then I'd argue that hot linking is actually (ever-so-slightly) faster because the browser doesn't have to resolve the absolute URL from the relative path. In both cases, however, an extra HTTP GET request is performed, correct?
Faster Load TimesPages that use relative URLs will load more quickly than pages that use absolute URLs, for the most part, although the difference is minuscule at best.
Faster coding: Relative URLs. For faster and more effective coding, we recommend relative URLs. Rather than including the entire URL for each page you link, relative URLs cut down on the workload and time needed. For example, coding /about/ is much faster than https://www.example.com/about .
An absolute URL contains all the information necessary to locate a resource. A relative URL locates a resource using an absolute URL as a starting point. In effect, the "complete URL" of the target is specified by concatenating the absolute and relative URLs.
THE ADVANTAGES OF RELATIVE URLS The loading time is somewhat faster with the relative URL. However, this “something” is so minimal that it is of no further importance for the ranking. If you move your content or put it on another server for testing, this can be done quickly and easily with relative links.
The correct answer is - it depends.
Hotlinking can be slow because -
Hosting on your server can be slow because -
If you assume both servers are identical in every respect, I'd say hosting on your server is going to be faster. This is true especially on new browsers where the number of connections per host is 6.
But sadly, things are never so simple. I'd recommend using hotlinking only if -
For all other use cases, you are better off hosting on your own servers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With