- Cacheing. Google is huge, and people spend more time on other sites. Chances are by the time they get to your site, they’ve already got a copy of your Google-hosted scripts cached in their browser.
- Speed. There’s the obvious facts of Google’s massive worldwide content distribution network, Google’s hosted libraries are served from cookieless domains and gzip compressed. But here’s the really cool one people don’t notice as much: no 304 responses. Google serves you jQuery with appropriate headers that tell your browser not to even bother checking if there’s a fresher copy on the server (there isn’t, if there is it’s served from a different URL). That’s at least 1 less HTTP request that the browser needs to make to load the page. Fast.
- Parallelized downloads (aka pipelining). Browsers typically make 2-8 (usually about 4) requests from a single domain at a time. As each request finishes it initiates the next request. So for a browser making 4 concurrent requests, each taking 100ms it will take you 300ms to load 10 pieces of content. If 2 of those requests are made to a different domain, then it reduces the time to 200ms. Pipelining gives you exponential speed increases, and since some of your files are hosted on a different domain you will gain speed from parallelization.
- 6,953 reasons why I still let Google host jQuery for me | Encosia (encosia.com)
- Hotlinking to be disabled on January 31, 2011 (jquery.com)
- How to reduce HTTP requests for your WordPress site (yoast.com)