Written on April 25, 2017 by Stephan Wehner.

A quick glance at Wikipedia gives us this:

A static web page (sometimes called a flat page/stationary page) is a web page that is delivered to the user exactly as stored, in contrast to dynamic web pages which are generated by a web application.

Well, that was ... not particularly helpful.

Thanks Wikipedia.

Here’s a waaaay less technical way of imagining what a static website is. Before we begin, just know that there are two kinds of websites: static websites and dynamic websites.

Imagine you’re the owner of a local sandwich shop. There are two ways you can use to start selling sandwiches to customers.

Dynamic Websites

Your first option is to do it like how Subway does it. Customers come in, you assemble the sandwich on the spot, wrap it up, then give it to them. A dynamic website works in the same way. Your user enters your dynamic website, and the web page is assembled on the spot. Usually there are a few common ‘ingredients’, like the footer or navigation bar of the website. These get assembled to make a the final web page the user sees.

Dynamic websites are very popular (think WordPress), and they come with a few upsides.

Firstly, in the same way it’s easy to make ‘edits’ to your sandwich this way, it’s also easier for you to make changes to your web pages. Just use a different set of ingredients, and presto! You get different sandwiches / webpages.

There are a few downsides to this.

Assembling a sandwich on the spot is slow. Dynamic websites are notorious for taking longer to bring up web pages. Not to mention, it can also be more expensive and slow to set up a dynamic website. In the same way you need to hire a trained staff to assemble personalized sandwiches, the infrastructure for a dynamic website will also cost you more and take longer to get off the ground.

Static Websites

You have a second option — give your customers pre-packaged sandwiches. Customer walks in. You give them sandwich. Done. Case closed. This is how a static website works. All your web pages are “pre-packaged” — as the HTML, Javascript and stylesheet files that make up the site. All these files are stored in their final form. There’s no assembling on the spot. Everything is neatly bundled up and packaged for your visitors to use.

You can see why are they called static: they don't change. The content is the same, day in, day out; depends on nothing, totally constant. The content is stored in a file, which is stored on the web server. Visitors follow a link to that file, which is given by its file name (and directory). Anyone following that link will receive the same content: namely the content of that file. So all visitors get exactly the same page.

With a dynamic page anything on the page could be different from one visitor to the next: a user name is shown in the header, the footer has different links depending on the visitor's location; or even the main content can be different from visitor to visitor; think what a Twitter is shown on the Twitter home page.

Historically, the very first web pages on the Internet were all static. Over time, the Internet started moving over to dynamic websites which then became the dominant force online. Now, however, static websites are seeing a comeback.

Advantages to Static Websites

Well, static websites are fast. Everything is in place already – all the customer needs to do is walk in and take the sandwich! When compared to even the most optimized and well-managed dynamic websites, static websites are still at least 6 times as fast. In a world where users close a web page if it takes more than 3 seconds to load (and this is an actual statistic), this is rather important.

Static website are not only faster for the individual user, but they can also serve more visitors! Where a server for a simple Wordpress site may work well for 100 concurrent visitors, that same server would be expected to support 100,000 visitors per second for a static site!

Of course, most sites do not have that many visitors, but from time to time, such bursts can still happen to any site; for example, a story in the press can send people from all around the world to your site. Have you heared of the Slashdot Effect? Static sites to the rescue! For many of these cases you will have enough time to prepare.

Besides speed, static websites are also more reliable and easier to maintain. They don’t break down or glitch as often as dynamic sites. Maintaining a static website, therefore, is cheaper and requires less hassle. There's much less to worry about in terms of security. If a static sites is hacked the same hack would reasonably have "worked" with a dynamic site as well. But with a dynamic site there's more to go wrong. Many hacks work because of faulty input processing, and with static sites there's hardly any processing as such. Most of the processing is to look up the file! That's a pretty easy task.

Static websites are quick and cheap to build. If you’re looking for a simple and straightforward website, this would fit your bill.

Another advantage of static sites is that they are easy to back up. Because a static web site simply consists of all the files that make it up. Plus possibly the configuration files of the web server. Backing up a bunch of files is pretty easy.

On the other hand, a dynamic website most likely depends on all kinds of supporting software (libraries, plugins). These are often upgraded in incompatible ways forcing you to keep track of their versions and how to install them. A dynamic site requires backing up the database as well, this database may be large, and it also may contain personally-identifiable information that you would want to protect, for example.

Disadvantages to Static Websites

There a few drawbacks. Imagine you wanted to change and ingredient in your pre-packaged sandwiches. That’s going to be a bit troublesome – you’d need to reopen every package, manually change the ingredients in each sandwich, then reseal them. Now, if you only had a few sandwiches, this would be very easy to do. But with thousands of sandwiches…

The same applies to static sites. If you want to make an edit to a common ‘ingredient’ in every web page, say the navigation bar, you’d have to manually go through page to do so. If you have a few pages, this isn’t much of a hassle – overall you’re still saving time, money and energy with a static site. But if you are the owner of giant website sprawling thousands and thousands of pages, then maybe a static website might cost you more than its worth.

Another drawback is that you are likely to need a professional developer to make edits to your static website. Making edits itself aren’t difficult, but it requires some simple technical skills you may not wish to learn.

Summing Up

So, are static websites the right choice for you?

If you’re looking for a simple website for your business, then the answer is probably a yes. It’ll cost you less, spare you the pains of maintenance and broken web pages, and generally be waaaaay faster for your users who visit.

If you’re looking for a complex website for which you make constant edits, then a static website may not be well-suited for you. You will end up spending more to develop a dynamic website, and it will be slower and may have a few maintenance issues from time to time. But overall, it might be more convenient in the long-run.

Recent Posts

List of all blog posts.