📜 ⬆️ ⬇️

Easy way to lose customers or why not use Google CDN


If you are developing web applications and link to popular JavaScript libraries and fonts, this article will be definitely useful for you.


Problem


According to Wikipedia , all resources of Google have been blocked in China since 2014, including search, maps, Gmail, Google Play and Google API. This means that your users, while in China, will not be able to download those resources from the CDN to which you refer. Well, if we are talking only about fonts, in this case your website will only look different than the designer intended. Much worse when it comes to JavaScript, because with a high probability your site will simply break. It is worth noting that the “Great Chinese Firewall” has one interesting feature: the browser will wait for a response from the blocked resource until a timeout occurs. Thus, if you upload your JavaScript synchronously, then within 30 seconds your user will look at the white page, which eventually, of course, will load, but will hardly be functional.


Update : this problem is also relevant for users of Crimea, as part of Google services does not work there.


Background


"Great Chinese Firewall" is a widely used term in the media that defines the Chinese government's initiative to regulate the Internet in mainland China. This is the main tool for the introduction of censorship in Chinese society, along with criminal laws prohibiting the dissemination of certain ideas in the network. Effective since 2007.


But I have no customers in China.


Big mistake to think so. In China, a large number of foreigners live permanently, people regularly come here on business trips. Probably, among them will be your customers who, while abroad, will want to use your resource, order goods or services for themselves and their loved ones. Ignoring them, you make a great gift to your competitors, because you yourself encourage your customers to try their services and, perhaps, after that you will not see them again.


How to solve a problem


Very simple: just use any other CDN, making sure it is available, or transfer all the resources you need to your own servers.


If you use Google Analytics or social buttons (Facebook and Twitter, by the way, are also blocked), this will have almost no effect on the operation of your site except for two unpleasant effects: social buttons will not appear on your page, and the download indicator will be active even in within about 30 seconds after the page actually loads.


VPN as a solution


It is widely believed that VPN can solve all problems. This is not entirely true:



Conclusion


I hope my article will help to make the Internet a little better and more accessible for guests and residents of China, who have been with me recently.


')

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


All Articles