Is it better to load things from google's CDN??
Say I use jQuery, is loading it from googleapis.com:
generally better than using a copy from the machine hosting most of my site:
Pros/cons of using CDNs vs. getting the resource "locally"?
Two things come to mind, one good and one not so good. The good part is that by relying on Google's server means there's potentially a (very) small increase in page loading speed because it's in a separate namespace. The not so good part is that you're relying on a specific version of jQuery. In the end, using Google's server is probably the superior choice, but the differences either way are miniscule.
I found it better to search for "pros and cons google hosted jquery", so found some answers. To summarize the benefits of pointing to googleapi.com are "decreased latency, increased parallelism, and better caching."
Since you're loading a commonly used URL ("//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" in the case of jQuery) it's possible (or likely) it's already been loaded and cached. Excellent!
And, that way Google can keep track of every site that is using it.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)