CDN failover to domain-provided js files?

CDN failover to domain-provided js files?


Many of us use CDNs to load jQuery and jQueryUI+themes and we can all
agree this is a great service and a nice performance goodie.
I wonder, has anyone written or seen anything about a fast and robust
CDN failover strategy?
Consider these scenarios, for example:
* You're developing, but all your pages deep-link into a .JS-framework
CDN, but you don't currently have a live internet connection.
* Your end-user can access your website but, for any of a number of
plausible reasons, ajax.googleapis.com isn't responding so your end-
user isn't well-served.
Any ideas? Can you think of a fast and robust wrapper that could, as
required, fetch jQuery framework files from, say, the virtual /js
folder -- an arbitrary alternate location -- if the CDN isn't
reachable?
**--** Steve