David's Coding Blog

Simple but fast website

How much does it cost to create and host a fast website?
Not much. Simplicity is key.

We all know how annoying it is to wait for a website to load. And if you want a lot of readers, a fast page load is one of many factors. Google admits that the speed of a website is a (small) ranking factor.

How to create a fast website?

Use a simple backend!

Do you need dynamic content?
For a simple page with very view changes, you can use a static site completely written in HTML. In this case the webserver (Apache, Nginx, ...) only has to deliver the files.

Do you want to reuse parts of your website?
Maybe a bit of PHP is enough. In this case the webserver has to execute a little bit of code. But it is still fast.

Do you need a CMS (Content Management System) so that users can edit content without HTML or PHP knowledge?
A huge CMS with a lot of features is maybe not necessary. A simple CMS tends to be faster than a bigger one.

Where is the content stored?
Is the content stored in a database or in files? If the server runs on a SSD, loading from files can be faster than loading from a database.

How to measure the speed of a website?

You can use the browser's developer tools like the network tab to see the time it takes to load a website with all its dependencies.
Google is also providing a tool called PageSpeed Insights. It gives you a score from 0 to 100 for the categories "Performance", "Accessibility", "Best Practices" and "SEO". You can see all the details what you can do to improve the score.

PageSpeed Insights of this blog

How is this blog built?

At this moment (2025-01-22) the content of this blog is written in HTML. I use PHP to reuse the header and footer. All CSS is written by myself to create the simple design you are seeing right now. The only third-party library I use is highlight.js to highlight code snippets.

The webhosting is a simple Apache server with PHP support as many providers offer. You can configure the (sub)domains with an admin panel and upload the files with FTP. In my case a GitHub runner is uploading the files to the server.