Engineering

Prerender Everything and Ship a Static Site

If two visitors receive identical bytes, a server runtime is a tax you agreed to pay for nothing.

2 min readPublished May 14, 2026
Share on X

Most sites do not need a server. They have one anyway, because the framework that generates them assumes it will, and removing it turns out to be nobody's problem.

This site is one of them. It is a blog. Every reader gets the same twenty-five articles, the same covers, and the same stylesheet, and the only thing that varies between two visitors is the HTTP header that asked for it.

The test

Ask one question: does the response differ for two different visitors? If every visitor would receive identical bytes, then anything that runs per-request is a tax you are paying for nothing.

GET /about

visitor A  -> 200, 8.4 kB, identical
visitor B  -> 200, 8.4 kB, identical

Conclusion: the server was not required.

What you get back

  • First paint stops depending on a cold start, a framework boot, or a region you happen to be near.
  • The failure mode changes from "5xx" to "file not found" — which is a much easier page to debug.
  • Caching becomes trivial, because every URL is immutable and every one of them is a file.
  • The deploy target stops mattering. Static host, container, edge — the artefact is the same.

The part people get wrong

Prerendering is not the same as hiding the page behind a spinner. If your article feed is assembled in the browser, you have not prerendered anything — you have moved the server's work onto every visitor's device and paid a JavaScript tax to do it. A page that only exists after hydration is invisible to a crawler and to anyone without JavaScript.

Where interactivity still belongs

Tabs, accordions, search filtering, a theme switcher. None of these change what the page says, so none of them need to block anything. Hydrate them after the content is already there and the page works either way.

The prerender step that does this here is one script and adds no dependencies to the install. It reads the post list, renders every route with the same renderer the client uses, and writes one HTML file per URL.

  • Web Development
  • Performance
  • Static Sites
KI

Kadirul IslamVerified author

Founder, A.K Solution

Follow on X

Founder of A.K Solution. Full-stack engineer building AI agent tools like KiCode, JSON form engines like ki-forms, and high-scale SEO systems. Obsessed with shipping fast, zero-bloat software that lasts.

More from Kadirul Islam

Cache Policy Is a Design Decision

Immutable, revalidate, or no-store. Choosing wrong is how you ship a 200 for a URL that should not exist.

2 min readCaching

Delete the Framework From Your Blog

A blog is the one project where the runtime is pure overhead. Here is the argument, and the build that settles it.

2 min readStatic Sites

The CSS Bug That Silently Deleted a Design System

One attribute selector outranked every component class in the build. Nothing threw, nothing warned, and the page just looked wrong.

2 min readCSS

The Router I Did Not Install

Two routes do not need a routing library. They need about forty lines and a hydration contract you can state in one sentence.

3 min readReact