JS library like JQuery can be linked directly from other site (e.g. google). Usually I use
But I can use
I like to take full control over my site, so I use the first way. But using google or other host has some advantage (i.e. decreased latency, increased parallelism, better caching). Both have advantage and disadvantage. What should I use? What you use and why?
Please let me know your opinion.
I think that it depends on the audience of your website.
If your site is public facing and people are going to be accessing it primarily or exclusively from the internet then you are going to benefit from lower bandwidth utilization, faster responses and caching benefits since the likelihood of the file having been previously referenced and loaded from another site is high.
If your site is internal for an intranet you may run into issues of people do not have internet access but you're also going to be wasting bandwidth since you're sending everyone out over the internet to fetch a file you could host locally.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki