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 now 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 time displayed was significantly shorter than on Vercel. Therefore, last week, I migrated my blog to Cloudflare Pages. This way, 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 initial loading time was completed within 3 to 5 seconds, with the longest being 6 seconds. For subsequent loads, due to caching, it took around 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 blogging framework, with the Yun theme.
One characteristic 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 time. 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, hot module replacement, and component on-demand bundling. I can also freely use Vite and Vue plugins.
Valaxy's Yun theme inherits the excellent features and functionality of the Hexo version, so I didn't have to spend too much effort to migrate 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, I plan to continue using self-hosting for the image hosting in the future. That's about it.