For a little while the YUI has been hosted by Yahoo; now Google is doing the same for jQuery, Prototype et al. There’s some documentation available but essentially you do e.g.:
(You can select specific major/minor versions via different URLs, though this places some limitations on the expiry headers that get sent back.)
Google recommends that you load the frameworks via
is the advantage of doing this? It seems to do nothing other than add
overhead unless there are complicated dependencies.
The headers that come back are
which seem pretty sensible. (Curiously, you only get a gzip response
with a Accept-Encoding that includes gzip and a User-Agent Google
recognises, like that of Firefox.
wget --header="Accept-Encoding: gzip,compress" won’t do it.)
I don’t know of any privacy or service guarantees. However, as Dion Almaer points out, they’re served from a ajax.googleapis.com, not google.com, so users’ google.com cookies aren’t available for tracking. As of now the service doesn’t set any either.
I’ve done a few quick tests, and serving prototype.js (30k, compressed) from Google to the UK and US is 4-5 times as fast as prototype.js from beebo.org (in Paris). For Australia, though, it’s only slightly faster.