I need to optimize an Angular 4 website that use Azure as a database services. It seems that when the site is open from China, "The Great Firewall" is blocking all loading libraries and services as Google Search, Google Maps,Facebook services and APIs, SmartLook, Intercom and etc. Even the azurewebsites.net is blocked so no dynamic info can be loaded. What is the best appropriate way to make a website version for China? Any suggestions?
Here is a little log that is returned when trying to load the website from China:
sdk.js Failed to load resource: net::ERR_CONNECTION_REFUSED js Failed to load resource: net::ERR_QUIC_PROTOCOL_ERROR connect.facebook.net/en_US/fbevents.js Failed to load resource: net::ERR_CONNECTION_REFUSED vendor.987e75786c79d833ce36.bundle.js:1 ERROR Error: Uncaught (in promise): ReferenceError: FB is not defined
The same error is returned for every external service or library that the Client side try to load.
I'm a developer in China and I can say that the only reliable way to load a website in China is to host it in China and to host all dependencies that your application has in China as well. If you use a service that is blocked in China (facebook, Maps, Search, etc.) forget about them. They will not be usable in China. There is no way around it. Only people using a VPN will be able to access your service.
For everything that is a library you want to embed there is:
For hosting I'd also recommend using a chinese hoster, but be aware that you are required to acquire a license in order to host a server in china, possibly you will be required to register a company there. If you need to host outside china, choose a server from a nearby country (korea, japan work well)
Its not easy building a service in china, thats one of the reasons almost all service providers have a seperate entity for their services in mainland china.