jquery from google or from your domain ?

Look at this results to find the answer.
German hosted domain, tested in Dulles.

IE9 jquery from own domain

http://www.webpagetest.org/result/110704_28_ZJAK/

IE9 jquery from Google

http://www.webpagetest.org/result/110704_KZ_ZJB6/

Chrome jquery from own domain

http://www.webpagetest.org/result/110704_E2_ZJ9P/

Chrome jquery from Google

http://www.webpagetest.org/result/110704_Q2_ZJA4/

Interesting results.

Note: Your test contain some errors . http://www.webpagetest.org/result/110704_Q2_ZJA4/ is slower because of a slow DNS query to your site, NOT the google host. You should repeat the test.

Also try the http version of the Google ajax-api’s hosting instead of https.

Generally it will be more expensive to fetch from a 3rd party because it has to do an extra DNS lookup. There are some benefits that can help mitigate that impact (Google’s CDN could have lower latencies to your users, reduces your bandwidth costs and higher liklihood that users will have the shared version cached already) but if you are only serving users locally then odds are that it will be faster to serve the content yourself from the same domain as your page.

Hi Patrick,

What about the theory that its likely someone visiting your site is likely to allready have the google code sitting in their cache.

cheers
Norman

There are varying opinions on that theory. With the number of different versions of each library there is an argument that the chance of a specific version being in the user’s cache is not as high as you might hope. If you are using the same version as a LOT of other sites then the liklihood goes up though.