Must I make use of a local copy of jquery, or must i connect to a duplicate supplied by Google or Microsoft? I am mainly worried about speed. I have heard that simply tugging content using their company domain names might have performance advantages associated with how browsers limit connections. Particularly, has anybody benchmarked the rate and latency of Google versus. Microsoft versus. local?

Also, must i accept any conditions or licenses to link from the third-party?

One advantage is a person may have diabetes already cached since another site also associated with a third party.

I have used google with this and haven't experienced any issues with it to date. It is simple to load jQuery using:

<script type="text/javascript" src="http://world wide"></script>

<script type="text/javascript">

    google.load("jquery", "1.4")


Anytime you utilize an resource located by a 3rd party you increase the amount of possible points of failure inside your application. Additionally you risk potential bugs caused by changes designed to the resource (say, fixing a bug or upgrading to an alternative version) through the hosting party.

Page performance could possibly suffer because of latency variations involving the site and also the host. Network black outs between your client and also the host may cause your page to fail, just like internet blocking for their Web service provider. For example, using code located by Google may cause trouble for anybody viewing your website from China.

It's better for security, performance, stability and version integrity to maintain all your assets in one location. Unless of course you are managing a absurdly high-traffic site, you should not be worried about disbursing your articles.

It is also worth observing that although jQuery is not exactly a featherweight include, it isn't obnoxiously large and, like every JavaScript includes, ought to be (but isn't certain to be) cached through the browser.

Most recommendations I've come across happen to be to make use of the located version of Google or Microsoft etc.

Dork Ward includes a nice article explaining the reason why.


  1. Decreased Latency
  2. Elevated parallelism
  3. Better caching

See his publish for stats.

Dork does explain that you ought to only do that for Public Facing websites.

I've been using Google's AJAX library hosting in production for many clients. Works like no bodies business, and it is certainly the easiest method to go.

I recommend loading jQuery in the CDN that jQuery provides itself:

It's not necessary to subscribe to any accounts, the origin will download from as near to the user as you possibly can, and it's not necessary to be worried about certification.

I would suggest always hosting your personal local copy.

  • The server may go lower.
  • The server could change version from the located file.
  • Your user's could randomly create an excessive amount of strain on the located server that they might not be thrilled about.

I believe its reasonable to utilize a located link when you're posting sample code you need to "work" with no user needing to download jquery.