Just for faster performance: prioritizing performance and aesthetics, I have made some major changes to my blog in the past few months.
Server and CDN#
You might find it hard to believe, but my blog is using Cloudflare CDN.
A few months ago, I hosted my blog on Vercel, but later when I wanted to add it to the HSTS Preload List, I found that it was difficult to modify the response headers on Vercel (it required modifying vercel.json
). So, I decided to switch the entire domain's Name Server to Cloudflare, and the speed was not that bad either.
Later, when I tested the blog loading performance on Cloudflare Pages using DevTools, the loading completion time displayed was significantly shorter than on Vercel. Therefore, last week I migrated my blog to Cloudflare Pages. As a result, without the origin delay, the loading speed has improved significantly.
In the Ten-Year Pact and the QQ group, I shared the link to my blog and requested everyone to visit it in order to gather enough feedback. Basically, most of the feedback I received was that the first load was completed within 3 to 5 seconds, with the longest being 6 seconds. For subsequent loads, due to caching, it took about 1 to 3 seconds to load. This indicates that the current user experience is much better than in the early stages of the blog.
Framework#
Previously, I used Hexo as the blog framework and Yun as the theme.
One of the features of the Yun theme is that it does not rely on jQuery at all. All resource files are loaded from a public CDN, which fundamentally speeds up the blog's loading speed, and I only needed to solve the image hosting problem.
But you might ask, "Previously? What about now? Are there any other good static blog generators besides Hexo?"
Well, if you scroll to the bottom of the page, you will find this line in the footer:
Now my blog is using Valaxy as the generator. Since the development of the framework uses Vue 3, Vite 4, and ESBuild, my blog can have excellent page transition experience, page hot updates, component on-demand bundling, and can freely use Vite and Vue plugins.
Valaxy's Yun theme also inherits the excellent features and functionality of the Hexo version, so I didn't spend too much effort migrating my blog to Valaxy.
Image Hosting#
In the previous few articles, I used CSDN and Mihoyo's image hosting, but eventually switched to self-hosting due to the lack of caching.
The current solution is to use Vercel + Cloudflare for loading, and there is also the previous Cloudflare R2 and Backblaze B2 image hosting.
However, the self-hosted image hosting is expected to be used in the long term. That's about it.