The power of Cloudflare and the basic web
Yesterday I completed most of the migration that I wanted to do on my blog. The last item on the todo list was to stop using the external CDN hosting bootstrap's CSS. It's now hosted on my server and cached by Cloudflare.
The difference was pretty huge. Load times came down from the occasional 2+ seconds to between 400 and 600 ms. And from Chrome's lighthouse I now get the following report
Previously the results for performance and best practices were wayyy below 100. If I recall right, my performance was stuck at 60 something.
I'm really happy with this. This site is running on a vanilla Ghost instance sitting behind a barebones nginx instance. I've not done any optimizations to my site's html or main CSS to actually get it to run faster. The only changes I made to the site were:
- Removed any custom fonts. System fonts only
- Moved all the resources to be served by my server and I've had those cached and served by Cloudflare
Those two changes together took me all of half an hour. Maybe a tiny bit longer to fine tune some of the font sizes and line spacings too. Changes in Cloudflare were just a few points and clicks. And that was where most of the performance improvements came from.
I can still take it further. For example, it's pretty poor how I've divided my CSS up. I'm also still using the full feature bootstrap CSS just to have a nice fluid layout to the website.
But even without those optimizations, the site is running very well for me and for anyone who wants to read it too. And I can stop here and it'll be just fine.
Basic technology. Works great.
But again, why is this important?
In developer circles these days I'll keep hearing about JAM stacks and various platforms like Gatsby and Netfliy and optimized static sites using serverless functions. I was even considering hooking up my ghost instance to Netlify using the built in integrations. And while none of those are bad, I've travelled that circle before when Jekyll and other static site generators were constantly being discussed across various forums. My memories of those days are not fond. Not because the tools were bad. I feel like I spent more time on tooling and meta discussions of various tools than actually creating content. I even became inspired to build my own static site generator. If my memory serves me right, I wasn't alone at the time either.
When a vanilla CMS + basic Cloudflare settings provide such a solid starting platform I think we should be promoting these methods a lot more. Again, not that any of the current static site platforms and tools are bad. Just that we want to be getting people to the step of actually publishing content as quickly as possible.
But even if someone wants to tinker with interesting systems, more power to them. I still believe there should be more diversity of opinion within these social circles so that people starting out don't feel pressured into believing that a CMS backed site is not good enough for current cultural norms.
Because the truth is, it can be great. It might still be possible to get hugged to death by a site like Hacker News, but worrying about getting the HN hug of death should not be on anyone's list of concerns when starting out.
To summarize, the power of tools like Ghost and Cloudflare in their vanilla forms is good enough for almost anyone getting started out. And no one should feel inadequate in choosing this basic approach. It's the path to least resistance when publishing which in my opinion isn't thought of as much as it should be. And it can deliver a rock solid experience to a visitor which is (or should be) a primary goal of any website. And promoting these kinds of solutions will also help adjust cultural norms for anyone getting started out.
Posted on May 13 2020 by Adnan Issadeen