5 ms·
Keep in mind the Google CDN is blocked in countries such as China, so your web fonts are not going to render for those visitors, and if you rely on jQuery from
by Throwaway90283 12y ago
Keep in mind the Google CDN is blocked in countries such as China, so your web fonts are not going to render for those visitors, and if you rely on jQuery from the Google CDN, those visitors will experience a broken site. If you have a global reach, this is one reason to self host.
- cozuya 12y ago<script src="//code.jquery.com/jquery-1.9.1.min.js"></script> <script> window.jQuery || document.write('<script src="/js/jquery-1.9.1.min.js"><\/script>'); </script> This has to be pretty standard in 2015 right?
- acdha 12y agoInterestingly, that's true for scripts but it's not for webfonts because @font-face allows multiple sources, including local system fonts, and the browser will keep trying until it finds one which works. Here's a test page: http://chris.improbable.org/experiments/browser/webfonts/webfont-failover.css http://chris.improbable.org/experiments/browser/webfonts/web... You can see that it first gets a 404 before continuing on to a URL which works: http://www.webpagetest.org/result/150221_J4_43K/1/details/ http://www.webpagetest.org/result/150221_J4_43K/1/details/
- oxplot 12y agoSteve Souders from Google goes through dealing with this [1] and I was surprised to see how Twitter approached this (basically encouraging putting sync javascript link at the top of the page) [1]: https://www.youtube.com/watch?v=aHDNmTpqi7w https://www.youtube.com/watch?v=aHDNmTpqi7w