Does anyone know if Google\'s CDN for jQuery is available in China?
http://code.google.com/apis/ajaxlibs/
I might have a project where I\'ll need to support
As other answers suggest, no its not reliable to use Google CDN for visitors from China.
To reliably load jQuery from CDN, you have to fallback to alternative CDN. If you load from Google CDN and fall back to another one, your visitors will have to wait for too long for the first request to fail before the browser sends the second request to the fallback CDN. I would recommend you to use alternative jQuery CDN as preferred option, and fallback to Google CDN only if the other one is down. Here is how to do it:
<script src="https://pagecdn.io/lib/jquery/3.2.1/jquery.min.js"></script>
<script>
window.jQuery || document.write('<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"><\/script>');
</script>
We are doing it the opposite way and use some other CDN as your preferred option and fallback to Google CDN to avoid failed requests and waiting time.
Some time it will be unstable. You‘d better use cdn of China, such as 163.com sina.com.cn
Baidu has hosted cdn http://developer.baidu.com/wiki/index.php?title=docs/cplat/libs But couldn't find jquery css
SINA CDN: http://lib.sinaapp.com/
http://jscdn.upai.com/: Don' have Bootstrap
We have implemented Sina CDN in our website.
Best Regards Sudipta Banerjee
From my experience, the jQuery library on Google CDN is not available in China , when you try to access the following url, you will get error in console of the browser
https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js net::ERR_CONNECTION_CLOSED
https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js net::ERR_CONNECTION_CLOSED
Yes, It's available in China, and I am using it right now.
As of this weekend, it's not available in China. Kind of a show-stopper for me. I like the fallback mechanism in any case!