Should I use a local copy of jquery, or should I link to a copy provided by Google or Microsoft? I'm primarily concerned about speed. I've heard that just pulling content from other domains can have performance advantages related to how browsers limit connections. In particular, has anyone benchmarked the speed and latency of Google vs. Microsoft vs. local?

Also, do I have to agree to any conditions or licenses to link from a third-party?

Accepted Answer

One advantage would be that a user may already have it cached since another site also linked to a 3rd party.

I've been using google for this and haven't experienced any problems with it so far. You can easily load jQuery using:

<script type="text/javascript" src=""></script>
<script type="text/javascript">
    google.load("jquery", "1.4");
Written by baloo
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the community.
It is licensed under cc-wiki