I finally made the long discussed flip over to jQuery. It took me about 4 and a half minutes. It should have been a 30 second process, but I had a few lightbox
As a handy extra, they take care of compressing and minifying for you, and are committed to keeping a library online permanently after it is hosted.
That said, I’m not sure how long I’ll keep it. There are a few things that I think every responsible webmaster has to think about first. Personally, I would only use it as part of an informed company strategy (I could see a savings on a big site like ExpressionEngine.com in terms of bandwidth and perceived load time). But there are still some downsides I just haven’t fully reconciled yet. Let me address the three most relevant ones that I see.
What if Google goes down?
Google? Not likely, but this is probably the most valid argument I can think of. I suppose if one were really concerned about it, they could use:
// jQuery obviously hasn't been loaded... let's get on that shall we...
// oh, and don't flame me for document.write... its just an example
This is true, and of course is a risk with any remotely loaded script or content (think of all those Google Ads… now there is a hacker’s wet-dream). I already allow Google Analytics here, so its a risk I’ve already thought about, and am prepared to take.
What about privacy? Google is collecting a lot of data.
Also valid of course. Firstly, I’m already giving them access to that data via analytics, but the broader question I suppose is what do they do with all the data they collect. For now, I’m comfortable with their privacy policies and published data collection protocols, but I admit to being uncomfortable with any one agency having all that data.
Now, for frameworks like CodeIgniter, I see another major benefit, albeit, on a pretty selfish level. As has been discussed, CodeIgniter is getting a jQuery library added in. One of the really pain in the ass things about building this library, has been trying to figure out the most elegant ways to include the library source files. Adding the whole jQuery library to the CI download isn’t really a good option; not everyone will want them, and every dev has different preferences about where they keep site assets anyhow. With the advent of this API, we could conceivably use google as a default source dir, and allow devs to over-ride that with a config or initialization setting. Let me just caution now that this is a totally “off the top of my head” thought, and I’m not saying CodeIgniter necessarily will do this, only that its something worth exploring.