re: What are the benefits of using a static frontend? VIEW POST


A few reasons why people (like me!) prefer building static sites to server-driven dynamic ones, even ones cached on a CDN:

  1. There's no long-running server process to worry about managing, scaling, or securing.
  2. They're usually cheaper to host, precisely because of (1).
  3. Easier to develop locally. Since static sites aren't usually tightly coupled to a backend server, but rather to files in a git repo or a 3rd-party hosted API, it's easier to set up the development environment.
  4. Better versioning of content. Since many static sites draw content from files in a git repo, it's easy to version all changes to the content within that same git repo.
  5. Better versioning of rendered sites. Likewise, since the output of a static site is, again, just regular files, it's easy to version the outputs in git. Services like Netlify can do this even if the outputs aren't saved to a git repo.
  6. Getting a server's frontend cached to a CDN is comparatively hard. Getting an SSG cached to a CDN is easy since most static site hosts do this automatically.
  7. Tooling. A lot of the buzz around SSGs is very closely related to the buzz around frontend JS frameworks in general. Tools like Gatsby and Nuxt allow frontend developers to not only build single pages but entire multi-page websites, without leaving the comfort of their existing development workflows.
  8. Decoupling the static frontend of a site from its backend makes it easier to support and extend both. The backend just needs to focus on data, the frontend just needs to focus on presentation. It also makes it simpler to reuse the backend data for multiple purposes (such as a website and a mobile app). The static site just becomes a smaller piece of the overall system in the case, as opposed to the server playing multiple roles when it is handling both the data and the presentation.

These are basically the exact reasons I went from WordPress to Jekyll for my personal website and could never go back. So much stress in setting up and updating it is now gone. Plus it was relatively easy to work in tools I wanted like Tailwind and Turbolinks.


Exactly this.

To add, decoupling the frontend and backend can also be useful for client work. Clients love CMSs like WordPress because it's easy for them to mess with things, but sometimes they mess with things that they shouldn't. By decoupling things, they have the ability to make changes to content, but not to the frontend unless they know what they're doing.

Here's a good read that goes into why people would use a static frontend on a WordPress backend:

code of conduct - report abuse