About the dangers of CDN, services and fonts from Google

As you know, today more and more developers prefer to load js-libraries from Google's CDN (for example, jQuery). Moreover, it is even considered good form - in more than 50% of cases, the same jQuery is in the cache of the user's browser due to visiting other sites that use the same CDN. And everything would be fine - your server has fewer hits, the user’s site loads faster ... There are no visible flaws.

And what if you work in the global market? Using googleapis, you immediately cut off a huge part of users from China!

The large Chinese firewall blocks not only Google’s search engine, but all its services, including the CDN. Thus, in China, your site becomes either unavailable (if you connect jQuery to body), or it does not work exactly as you expect (if jQuery connects at the end of the code). The same goes for Google's fonts, Google's charts, Google's reCaptcha, and everything else “from Google.”

Conclusion: If you are interested in users from China - you should reconsider your opinion regarding the loading of libraries or fonts from Google CDNs.

PS Even if your site is not focused on a Chinese audience - think about those of your users who may be traveling or traveling on business in China.

The simplest example is an attempt to register for habrahabr.ru from China:

image

Service gives an error: It is necessary to solve the captcha

And there is no captcha. Because reCaptcha is “from Google”.

Source: https://habr.com/ru/post/412797/


All Articles