TLDR; The average Gatsby site takes 32.1 seconds to load in China. Not to mention, the average Gatsby site fails to deliver 29.1% of its web resources when compared to the website delivered elsewhere globally.
This article goes into the reasons why Gatsby-based websites don’t work in China by default and a few actionable steps you can take to resolve them.
Gatsby is an open-source framework for building CMS, API, and databases. Gatsby differentiates itself as a static site generator (SSG) at its core, which separates content, templates, and databases for increased performance, scalability, and reliability.
Gatsby is a versatile React-based framework that is often used by content management systems (CMS) such as Drupal, WordPress, and Contentful. Its features include tools to publish, manage and deploy digital content in a streamlined, agile manner.
Some examples of companies that use Gatsby include IBM, Diem, and Daniel Wellington.
Gatsby is a powerful tool globally. However, in China…
The average Gatsby site
takes 32.1 seconds to load in China
The average Gatsby site only successfully delivers 70.9% of its web resources in China
*The numbers are collected based on findings from the Chinafy Global Speed Tests.
It’s not just Gatsby. Technical incompatibility impacts any global website to some extent, causing the average website to load in 30 seconds in China.
Global websites face a broad range of technical issues which boil down to i) infrastructural incompatibility and ii) code-based incompatibility.
i) Infrastructural incompatibility: Hosting location and choice of CDN
Most Gatsby websites use Gatsby Cloud for faster build times and deployment. Its edge network leverages Fastly as the primary CDN.
See how Fastly performs in China (in teal).
Gatsby users who do not use Gatsby Cloud (or Fastly) are not immune to issues commonly found in cross-border data transmission. These include low throughput and high latency in China.
ii) Code-based incompatibility: 3rd-party plugins, blocked resources & custom codes…
You may know Google, Vimeo and Facebook are inaccessible in China. And the same can be said of supporting resources such as Google fonts, Vimeo videos, and Facebook trackers.
And these are just a few out of the thousands of examples that face incompatibility issues in China.
You could remove or replace these entirely, but not without researching, testing, and deploying.
This repeats with every roadblock – and chances are, there could be thousands…
That said, not all hopes are lost on Gatsby sites. Like any global website, Gatsby websites can benefit from technical actions such as:
Hosting Gatsby websites in China
Using a CDN
When it comes to regional hosting, the expected steps are that you’d -
Build a new site
Get a server, and then
Host your site there
The case for China is, however, much more complicated.
Timeline: Companies going the traditional onshore route tend to take an average of 3-4 months of website development and another 6-8 more to apply to become a licensed web content provider.
Expertise: Common web resources (e.g., YouTube) are slow if not made inaccessible in China. You’ll have an expert headcount to manage a list of these resources to exclude or replace on your localised site in order to achieve and then maintain performance in China. This applies to websites hosted onshore or otherwise.
Costs: A fully onshore website costs between $42K to $100K from the get-go. If you’re looking to maintain the website, it’s a common practice to budget for hiring an agency/in-house headcount.
China CDN can definitely deliver some forms of acceleration in China, but…
China CDNs - like all CDNs - don’t resolve or optimise any third-party, code-based incompatibility issues which means the Gatsby site can still be broken, albeit faster.
Last but not least, there is Chinafy, which can do better, and faster.
Chinafy optimizes Gatsby websites to achieve virtually onshore performance with a full offshore set-up. Chinafy resolves over thousands of code-based incompatibility, and powers the website with CDN for China delivery.
The outcome is a much faster, optimised, fully-managed version of the global site in China.
The best part? The launch takes only ~1.5-2 weeks.
Want to make your Gatsby website work in China?
Contact Chinafy to learn more!