What is a static website?

SHARE

What is a static website?

SHARE

What is a static website?

At the risk of stating the obvious, we strongly believe that common knowledge can easily be forgotten or kept in a purple haze behind new flashy terms and technologies.

Written by:
  • Nebojsa Radakovic

    Nebojsa Radakovic

Last update: July 6, 2021
A static web page (sometimes called a flat page or a stationary page) is a web page delivered to the user's web browser exactly as stored, in contrast to dynamic web pages, which are generated by a web application.

Source: Wikipedia

It is a pre-built HTML page with CSS and/or JavaScript, not a generated page by the server. Wait. what? The way this works is like this. The browser requests the URL of a static page, after which the server delivers the whole static page with all the content already there.

No calls are made to a database, and no content is generated on the fly or at the request time. This is different on so many levels than what your WordPress is doing right now, for example.

So, with the above in mind, a static website is a website that consists of a bunch of HTML pages. However, this is not entirely true today.

Static vs. dynamic websites

On static websites, we have HTML, CSS, and JavaScript files. While serving from a server, these files are not dynamically rendered on a server which means you always get the same pre-built files. However, the page content can be changed with the JavaScript code you have executed in the browser, not the server.

On the other hand, dynamic websites generate content/pages with the help of a server-side language like PHP, for example. This means that the server dynamically renders the page for each page request. The page content can still change similarly as with static, but if you, for example, refresh a page, you’ll be served with a newly server-generated page that can be different from the previous one.

The benefits of static websites

Improved performance for end-users for one. Your site is going to be light, and above all, fast. Higher security thanks to the fact you are serving simple HTML files. Flexibility because many different frameworks can render your pages. Finally, significant cost savings thanks to utilizing cloud storage and lack of constant maintenance of the server.