Chinafy works with all kinds of websites. However, there are best practices you and your development team can follow to achieve the best results with Chinafy.
This working guide are for companies who are in the midst of building or revamping a website or have development resources to support further performance gains.
1. Set the cache header correctly to help our team distinguish resources that are cacheable / non-cacheable.
2. Double-check your HTML to see that there are no broken html tags (eg unclosed tags).
var imagePath = '//abc.com/image1.jpg';
var imagePath = 'http://abc.com/image1.jpg';
4. Use versioning parameters such as "file_20220801.pdf" to help us better sync and manage the files that have been/will be copied on Chinafy.
- Video: Avoid using embed plugins for Vimeo or YouTube videos. Chinafy works best with direct embeds on both platforms and you'll require custom handling with others. More information is on this help doc (linked).
- Don’t add timestamp to the resources when avoidable.
- We work best with static urls from the primary domain, so in other words urls that are dynamically generated, or retrieved from a third-party domain might be incompatible with standard Chinafy. We have custom handling for specific third-party domains, however, avoid these when possible.
- For Forms: Don't use Google Forms (explicitly blocked in China).
- Avoid setting all images as dynamically retrieved if unnecessary. In many cases, images don't need to refreshed by the second. By setting them as dynamic instead of cacheable (with reasonable expiry times), this will allow us to optimise, cache, and deliver sizeable files like images via our CDNs faster to all visitors.
var imagePath = host + '/image1.jpg';
var imagePath = '//abc.com/image1.jpg' + '?quality=10';
var imagePath = '//abc.com/image1.jpg' + query;