There is a very popular Javascript library known as jQuery. Google hosts a free CDN for a number of Javascript libraries including jQuery.
As a lot of websites use Google's CDN for jQuery, a large number of visitors to Stack Exchange will already have it cached and not need to reload it, thus resulting in a faster user experience. In contrast, if SE were to personally serve jQuery on their CDN, every first-time visitor to Stack Exchange would have to retrieve it.
The only information Google gets from you when you fetch jQuery is basic information that your browser sends to every website you visit. Because Google's CDN is not hosted on google.com
, Google's standard cookies are not sent, and as far as I can tell, Google does not set cookies on googleapis.com
, partly because that would only decrease the efficiency of a CDN.
For example, my browser sent this
GET /ajax/libs/jquery/1.10.2/jquery.min.js HTTP/1.1
Host: ajax.googleapis.com
Connection: keep-alive
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36
DNT: 1
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
If-Modified-Since: Tue, 09 Jul 2013 11:31:25 GMT