开发者

Backup CDN Javascript Library Location

开发者 https://www.devze.com 2023-02-25 04:03 出处:网络
Our web app uses开发者_如何学C the Google CDN to link to the jQuery library and it\'s starting to become very prevalent on our site. We have a major problem every now and then when clients install a f

Our web app uses开发者_如何学C the Google CDN to link to the jQuery library and it's starting to become very prevalent on our site. We have a major problem every now and then when clients install a firewall and specifically allow our website - but they know nothing of these external javascript libraries. It's not a simple case of doing something like checking whether the client can run Javscript - because they can ... they just don't get jQuery and hence functionality is broken.

Is there such a thing as a "backup" JS library where I can specify two locations to check? My other alternative is to provide an FAQ entry for people using a firewall. Hosting the libraries locally isn't really a good idea for us because we're trying to keep bandwidth down, and I like having those libraries elsewhere.

If I include two <script> tags it will download them both, correct?


<script>!window.jQuery && document.write(unescape('%3Cscript src="js/libs/jquery-1.4.2.js"%3E%3C/script%3E'))</script>

Found here Fallback for jQuery UI from google CDN

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号