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.
👍 Do's:
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).
3. Write Javascript for better resource discovery/scanning. The following examples will be discovered:
var imagePath = '//abc.com/image1.jpg';
var imagePath = 'http://abc.com/image1.jpg';
{
imagePath: '//abc.com/image2.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.
👎 Avoid:
- 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 static files (e.g. 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.
- Avoid adding dynamically generated parameters in the URLs for cacheable static files. This helps to ensure that these files can be cached on our CDN for faster delivery. The exception is if the static files require version control in which case adding versioning parameters could be helpful.
- Avoid non-standard or unconventional javascript formats like below. The following examples won't be discovered:
var imagePath = host + '/image1.jpg';
var imagePath = '//abc.com/image1.jpg' + '?quality=10';
var imagePath = '//abc.com/image1.jpg' + query;
{
imagePath: '/image2.jpg'
}
Comments
0 comments
Please sign in to leave a comment.