第 2 節

Deployment plan

0瀏覽次數0訪問次數--跳出率--平均停留

Introduction to the Static Website Hosting Service Pages

Commonly used Pages include GitHub Pages, Cloudflare Pages, and Tencent Cloud EdgeOne Pages.

Generally speaking, GitHub Pages has low bandwidth and unstable access within China, so it's usually not recommended.

Cloudflare Pages has high-speed servers globally (excluding mainland China 🇨🇳), so access is very fast worldwide (excluding mainland China 🇨🇳), with latency typically within 1–5ms. The downside is that performance in mainland China 🇨🇳 can be unstable.

Tencent Cloud Edge One Pages servers are primarily located in China (Mainland China 🇨🇳, Hong Kong, Macau, and Taiwan 🇭🇰🇲🇴🇨🇳) as well as in several major countries abroad. However, the downside is that you may need to file for domain registration in China, which requires purchasing a server and other items, making the cost quite high. (Tencent Cloud Pages comes with its own CDN, so there's no need to add another layer of CDN.)

It is said that Alibaba Cloud (Alibaba Cloud ESA Pages) is also working overtime to copy Cloudflare and Tencent Cloud EO, in order to counter Tencent Cloud EdgeOne Pages. It's unclear when it will be released, but hopefully it will also come with a free tier.

platformKey FeaturescostAdvantageDisadvantages
GitHub PagesHost a static websiteFreeTightly integrated with GitHub repositories, making automated builds convenient.Bandwidth is low, and access within mainland China is extremely unstable.
Cloudflare PagesGlobal high-performance servers (excluding mainland China)FreeExtremely fast global access, with latency typically only 1–5 ms; supports custom domains and CI/CD integration.The access speed from mainland China is unstable.
Tencent Cloud EdgeOne PagesThe servers cover major nodes in mainland China, Hong Kong, Macau, Taiwan, and overseas regions.There is a free quota.Excellent access speed for domestic users; supports EO CDN integrated acceleration; generous free tier.If targeting mainland Chinese users, ICP filing is required. The filing process is complex and may necessitate purchasing a domestic server.
Alibaba Cloud ESA PagesThe servers cover major nodes in mainland China, Hong Kong, Macau, Taiwan, and overseas regions.

Introduction to Content Delivery Network (CDN)

A CDN (Content Delivery Network) dramatically improves access speed and reduces origin server load by deploying cache nodes around the world, allowing users to load content from the nearest server.

Commonly used CDNs include Cloudflare CDN, Tencent Cloud EO CDN, Alibaba Cloud CDN, and others.

Cloudflare CDN has high-speed servers worldwide (excluding mainland China 🇨🇳), so access is relatively fast globally (excluding mainland China 🇨🇳). The downside is that performance can be unstable within mainland China.

Tencent Cloud Edge One CDN servers are primarily located in China (Mainland China 🇨🇳, Hong Kong, Macau, and Taiwan 🇭🇰🇲🇴🇨🇳) and in several major countries abroad. If you want to accelerate content for users in Mainland China 🇨🇳, you need to file for ICP registration, which comes with high costs. However, you can choose not to accelerate for Mainland China 🇨🇳 users. In that case, because Tencent Cloud's CDN in Hong Kong 🇭🇰 is of excellent quality, access speeds within China are still quite decent. Most importantly, there is currently a free quota available, which is more than sufficient for ordinary users.

Alibaba Cloud ESA CDN has a similar positioning to Tencent Cloud EO, but it's a product hastily imitated to counter Tencent Cloud EO. For now, it's far less user-friendly than Cloudflare and Tencent Cloud EO.

platformNode DistributioncostAdvantageDisadvantages
Cloudflare CDNFree global high-speed nodes (excluding mainland China)FreeExcellent performance, easy configuration, and broad global coverage.The access speed in mainland China fluctuates significantly.
Tencent Cloud EdgeOne CDNMain nodes in Mainland China, Hong Kong, Macau, Taiwan, and overseasThere is a free quota.Balanced access speeds for domestic and international users; high-quality Hong Kong nodes; free quota provided.If mainland acceleration is enabled, it requires ICP filing, which is costly.
Alibaba Cloud ESAMain nodes in Mainland China, Hong Kong, Macau, Taiwan, and overseasThere is a free quota.Balanced access speeds for domestic and international users; high-quality Hong Kong nodes; free quota provided.If mainland China acceleration is enabled, it requires ICP filing and the cost is relatively high. Additionally, the product is not yet as comprehensive as Tencent Cloud EO.

Matching scheme

Free plan

  1. Completely Free Option 1 Cloudflare Pages + Tencent Cloud EO CDN (Global acceleration, but not for Mainland China):
    (This option is more than sufficient for ordinary users, highly recommended.)

In mainland China 🇨🇳, the average is 150ms, while in Hong Kong 🇭🇰, the average is 2ms.

This is because Cloudflare has high-speed servers globally (excluding mainland China 🇨🇳), and Tencent Cloud CDN also has high-speed CDN in Hong Kong 🇭🇰, so access from mainland China is relatively fast and fully sufficient — and the best part is that it's completely free.

  1. Pure free solution #2 Cloudflare Pages + Alibaba Cloud ESA CDN (accelerates globally, but does not accelerate mainland China):

In mainland China 🇨🇳, the average is 240ms; in Hong Kong 🇭🇰, the average is 2ms.

This is because Cloudflare has high-speed servers globally (excluding mainland China 🇨🇳), and Alibaba Cloud CDN also has high-speed CDN in Hong Kong 🇭🇰. However, it currently doesn't seem to be as good as Tencent's, so it's much worse than Tencent's.

  1. Pure free solution three Tencent Cloud EO Pages + Tencent Cloud EO CDN (accelerates globally, but does not accelerate Mainland China):

In mainland China 🇨🇳, the average is 230ms; in Hong Kong 🇭🇰, the average is 2ms.

The reason it's not as good as Option 1 is that Tencent Cloud only has servers in major countries, while Cloudflare has high-speed servers worldwide (excluding mainland China 🇨🇳), so it's not as fast as Cloudflare.

  1. Pure free solution four Cloudflare Pages + Cloudflare CDN (global acceleration):

In mainland China 🇨🇳, the average is around 180ms, but some provinces (such as Jiangsu Province) experience abnormal access. In Hong Kong 🇭🇰 and Taiwan 🇨🇳, the average is 0–2ms.

This is because Cloudflare's CDN tends to be unstable in mainland China 🇨🇳, which is why it doesn't work very well.

  1. Pure free solution five Github Pages:

In mainland China 🇨🇳, the average is 100ms, while in Hong Kong 🇭🇰, the average is 51ms.

The latency doesn't seem too bad, and it's not half-blocked like Cloudflare, but the bandwidth is actually terrible—loading a single image is painfully slow. This is the least recommended option. (Even Hong Kong 🇭🇰, which usually has 2ms latency on any setup, jumps to 50+ms here, which shows just how bad it is.)

  1. Paid Plan 1 Tencent Cloud EO Pages + Tencent Cloud EO CDN (Global Acceleration, Including Mainland China):

In mainland China 🇨🇳, the average is 16ms, while in Hong Kong 🇭🇰, the average is 2ms.

The only costs are for the domain name and filing, which aren't that high either—Pages and CDN are both free.

  1. Paid Plan 2 Alibaba Cloud ESA Pages + Alibaba Cloud ESA CDN (Global Acceleration, Including Mainland China):

In mainland China 🇨🇳, the average is 12ms; in Hong Kong 🇭🇰, the average is 2ms; and in Taiwan 🇨🇳, the average is 4ms.

The cost is really just for the domain name and filing, and it's not that high—Pages and CDN are both free for now.

  1. Paid Plan Three Cloudflare Pages + Tencent Cloud EO CDN (Global Acceleration, Including Mainland China):

In mainland China 🇨🇳, the average is 10ms; in Hong Kong 🇭🇰, the average is 2ms; and in Taiwan 🇨🇳, the average is 20ms.

Because Cloudflare servers are located in Hong Kong 🇭🇰, Taiwan 🇨🇳, Japan 🇯🇵, and other regions, while Tencent Cloud CDN uses mainland China 🇨🇳 CDN, this allows Tencent's high-speed CDN to first fetch content from Cloudflare's fast servers, and then distribute it to users in mainland China, which is still very fast.

  1. Paid Plan 4 Cloudflare Pages + Alibaba Cloud ESA CDN (Global acceleration, including Mainland China):

In mainland China 🇨🇳, the average is 10ms; in Hong Kong 🇭🇰, the average is 2ms; and in Taiwan 🇨🇳, the average is 4ms.

Because Cloudflare servers are located in Hong Kong 🇭🇰, Taiwan 🇨🇳, Japan 🇯🇵, and other regions, while Tencent Cloud CDN uses mainland China 🇨🇳 CDN, this allows Tencent's high-speed CDN to first fetch content from Cloudflare's fast servers, and then distribute it to users in mainland China, which is still very fast.

Solution Showcase

  1. Tencent EO Pages + Tencent EO CDN

  1. Alibaba Cloud ESA Pages + Alibaba Cloud ESA CDN

  1. Cloudflare Pages + Tencent EO CDN

  1. Cloudflare Pages + Alibaba Cloud ESA CDN

Force the browser to refresh the cache.


# Chrome/Edge 强制刷新组合键
Ctrl + Shift + R (Windows/Linux)
Cmd + Shift + R (Mac)

# Firefox 额外步骤
about:config → 搜索 "browser.cache.disk.enable" → 设为 false → 刷新
npm run dev
音乐页