What is a static site and what is prerendering?
Pages built as HTML at build time, not on every request: faster to load, cheaper to host and with a smaller attack surface.
A static site is one whose pages are turned into complete, ready HTML files during the build, the process that packages the source code before it is published, instead of being assembled on the fly every time a visitor requests them. That process is called prerendering (or static site generation, SSG). It is the opposite of server-side rendering (SSR), where every request runs the server's code again, and of client-side rendering (CSR), where the browser assembles the page with JavaScript after it loads. With prerendering, the HTML that reaches the browser is already the finished page: no computation to run at request time, no database to query in that instant. The term Jamstack (JavaScript, APIs, Markup) describes the architecture born from this: pre-generated content served from a static host or a CDN, with dynamic parts added through APIs from the browser or during the build itself.
See also: Serverless vs On-prem vs EdgeServerless, on-prem and edge describe how and where compute runs: serverless offloads server management, while the other two say where infrastructure sits.
Why a static site is fast, cheap and has a smaller attack surface
Serving a file that already exists is faster than generating one on the spot: there is no server-side processing time between the request and the response, and the files can be served from a content delivery network (CDN) close to whoever requests them. web.dev's rendering guide ties exactly this to the consistently fast time to first byte (TTFB) of static generation. Hosting costs less because static files are enough, with no always-on application server; and the attack surface shrinks, because no database and no server-side code stay exposed to every request. It is the same reasoning behind comparing serverless, on-premise and edge when a workload is predictable and stable: the underlying question, how much computation a request genuinely needs, is the same one.
The limits: what a static site does not do on its own
Prerendering assumes content that changes little between visits: a catalog updated every minute or a dashboard with real-time data needs dynamic rendering or API calls from the browser after the page loads. Every content change, even one coming from a headless CMS, requires a new build, so a site with hundreds of thousands of pages can end up with build times long enough to need careful management. And a contact form or a shopping cart cannot stay static: they need an external service, typically a serverless function (see FaaS), to receive the data a visitor submits. Many prerendered sites then do hydration: they attach interactive JavaScript to the HTML already present without rebuilding it, so the page reads at once and becomes interactive a moment later.
A concrete example
A showcase site with a product catalog that changes a few times a month has no need for a server that recomputes every page on every visit. Generated as a static site, each product page is built once at build time and served identically to every visitor through a CDN: perceived load time drops, hosting costs a fraction of an always-on application backend, and there is no internet-reachable database to defend. The only part that stays dynamic is the quote request form, which forwards its data to a dedicated external service.
Why it matters for decision makers
Choosing between a static site, SSR and CSR is an architecture decision with direct effects on hosting costs, the speed visitors perceive and the surface that needs securing. For a mostly informational site, with content changing on a weekly or monthly rhythm, prerendering is almost always the cheaper, more defensible choice; for an application with data changing on every interaction, it is not. The criterion is always the same: how much of the content genuinely needs regenerating on every request.
Related terms
- Serverless vs On-prem vs EdgeServerless, on-prem and edge describe how and where compute runs: serverless offloads server management, while the other two say where infrastructure sits.
- FaaSFunctions that run only when an event calls them: no servers to manage, you pay only for what you run.
- Cloud repatriationIn cloud repatriation, an organization moves workloads from public cloud to infrastructure it controls, weighing costs, dependencies and operational continuity.
- Headless CMSA CMS that separates content management from its presentation: content ships via API, not through built-in templates.
If it is a technical decision you keep postponing, that is the decision I help you make.
See custom tools, governance and operations