If it’s not obvious already from the fact that cassette tapes are already making a comeback, nostalgia is officially back in full force. Disney’s live-action adaptation of both The Lion King and Aladdin follows on the heels of Cinderella, Beauty and the Beast, and the much more recent Dumbo, riding on the very same wave of nostalgia responsible for the return of cassette tapes. What is old is now new again and the world of web development isn’t immune from this wave.
When I first studied basic computer science in school, one of the lessons includes making my own personal web page. This was in school and the tool I was given was fairly limited so the page is just one static HTML page, a relic from the early days of the internet that was already falling out of favor compared to the more sophisticated dynamic pages that had already became the standard even then. Nothing ever stays dead however and slowly, 2019 has seen the quiet reemergence of static websites, a trend that businesses would do well than to simply dismiss entirely.
The unchanging nature of static websites
It’s a bit misnomer to call static websites unchanging, it is possible to alter static websites but the changes have to be directly performed at the source code. Each page is coded in HTML and they display the same information to every visitor and there’s nothing a visitor could do to change what is displayed on the screen. The easiest to think of a static website is to imagine a digital billboard where the content and the website are one and the same compared to dynamic web pages where the website and the content are actually two different entities.
Try opening and logging into an e-mail client and ask someone around you to do the same with the same e-mail client with their own account. Both of you would still be using the same website, Gmail for example, but the information contained within the website would be wildly different. The various social media platforms are also similar in nature and all of them are example of dynamic websites. They’re all great and if you’re running an e-mail client, a social media platform or an e-commerce website, simply indispensable, but recent developments have made static websites a lot more attractive and competitive, which is why you shouldn’t dismiss them entirely.
What makes dynamic website great is that they rely on server-side database to generate content while for a static website; each content would require its own hard-coded page, which would be impractical. Around the beginning of this decade however, static site generators began to emerge that makes it possible for web developers to create new pages by combining your content with a template file, which combines the sophistication of a dynamic website with the benefits of a static website, which will be explained further on.
Static websites are considerably more secure
The sophistication of dynamic websites come with a cost as every single you visit a dynamic website, the website has to communicate with a database in order to generate all of the contents you’re going to see on your screen. This is a bit of a problem because vulnerabilities mostly lies in these database and scripts and you’re going to always keep your website updated as quickly as possible to prevent these vulnerabilities from being exploited. As we’ve seen in the past few years, cybersecurity has become the kind of important issue it should’ve been from the beginning.
With static websites, the server would simply sent the page you’re requesting instead of generating them from scratch and static websites are more secure by default because there aren’t any vulnerabilities to exploit. Ask anyone who’s ever used Drupal and WordPress and how often they have to deal with updates. The scary thing is, even with all of those updates, the typical WordPress websites are still highly vulnerable because it’s a never-ending rat race against hackers. New vulnerabilities always pop out overtime.
Static websites loads faster
This is because of the differences in how static websites and dynamic websites work. As has been stated in the previous section, dynamic websites have to first communicate with a database before generating all of the contents and both of these things take time. Static websites skips them entirely by serving you a dish of already prepared webpage beforehand, making them considerably faster than the typical dynamic websites. Everybody values speed, which marks a win for static websites in my book.
Static websites are much less unwieldy
Platforms like WordPress aims to be the jack-of-all-trades by providing users with a selection of plugins that could be used to add additional functionality to a website. A simple Google search for “best WordPress plugins” for example wouldn’t lead you to one, two or even five plugins but a minimum of a dozen and some of them comes with a price tag of their own. Static websites are free from this problem as all you have to deal with is using the most appropriate static site generator that would be able to do exactly what you need it to do.
Static websites are generally more reliable
Simply put, since dynamic websites relies on databases to generate contents on the fly, any problem with your database could prove to be quite fatal. Since static websites don’t work with database, your users could go their entire life without ever having to see the message “Error establishing a database connection” splashed on their screen, which is quite an enviable proposition. One other advantage of static websites is that that you could also use CDN for more reliability. Since all the server does is to serve up a collection of static pages, you could host them in multiple nodes so that if one node goes down, another could simply take its place temporarily.