Why Static Websites Are Back In 2023 ?
Tags: webdev, javascript, jamstack, html
Published: 2023-07-21 03:31:31

## Static Websites in the 90's
When we first created websites many years ago, they were very static. It was all we knew. Html with some CSS and a small piece of JavaScript.

![static website for ahmedwaled web developer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4p2f9l01ud1awxbhaxw3.png)
Of course, this was very static and sweet at the time, but it became bad with the passage of time because there is simply no dynamic content that will be lost and everything will remain static, and this is something that will tire the programmer very much. Nevertheless, of course, the site was recording 100% performance, so it is considered incomprehensible except for some Javascript and HTML .

## Appearance of server-side languages
Over time, all companies moved away from the static method and moved to using some server-side languages. Of course, this is a very nice way to share instructions and data between pages, and there is a database and a complete control panel for the site. The content can be modified dynamically, but this also means that the front and back code was mixed together . Changing the page means making another call to the server and the slight flickering of the page can be seen as the entire page has to be reloaded each time.

## Single-Page Applications

After that, the one-page applications were purified, and we were able to share the components across the pages, and many offices and frameworks appeared, such as, React , Vuebut here there is a problem. For example, if you try, for example, to sell the one-page websites to any large company, they will tell you, but search engines will not be able to reach them.

## Static sites are back

So we really need something that is as functional as our static sites from the 90's but dynamic and powerful like a single page application with indexable code for better search engine optimization. This is why static sites are coming back. But we will not go back to the nineties. I mean we can if we want to. We can just create plain HTML, add more CSS and JavaScript and have a very static dynamic site. But what we really want to do is have a high performance static site with the look and feel of a dynamic one page app. This is what we mean when we talk about static websites today.

## Static not mean Static

You see, the problem we have is that static is just a terrible word because it means lack of traffic and really static sites don't lack traffic at all. But this is not the case at all. Static sites can be as dynamic as you like. To give you an example using mainly static Nuxt.js sites, once a user requests the page it is sent to them from a static hosting provider, serverless hosting as we call it. This page is already served and the customer views the page almost instantly. Then Vue hydration takes over and your apps start behaving as if it's a one page app, routing is done on the client side for example which is why we don't see page flickering when changing pages. All calls to your APIs are cached so there is no need to call the API to get that data as it is already there when client-side routing occurs. This really improves performance. But of course, not everything is cached and we can still call APIs in user events to submit forms for example, or even make payments. APIs give static sites tremendous power and are what play a huge role in making today's static sites so powerful.

UseFul Link:
[Why I Love JamStack - AhmedWaled](https://ahmed.lineitsolutions.com/en-us/blog/why-i-love-jamstack)

> Therefore, I tell you to rebuild your static site and make it using the JamStack technology, which is one of the concepts that applies the static site, but we can control it dynamically, and we would have gained a lot of points, so if your site is not very big, use this wonderful technology and I will give you the resources for it!

{% embed https://www.youtube.com/watch?v=4wD00RT6d-g&t=4542s %}