Just this morning the internet connection got all flaky on me and loading jQuery from Google’s CDN started taking a long time. Because of this, things like my menu, a slider, some graphing applications and a few other things started taking FOREVER to load. Chrome kept telling me it was waiting on the https address of jQuery. This made me think. “What if, 5 years down the road, jQuery 1.8.1 just isn’t available anymore?” So, I decided I better make sure there’s some redundancy in my scripts.
So, if you need to load jQuery, or anything really, and you prefer to use a central repository, but you want to have a local backup, just in case, do this…
Oh, and if you need to load jQuery UI too, it’s a little different.
These examples obviously use specific versions of the scripts. If you are (very likely) wanting to use different versions, just substitute them. Duh, right?