Writing

Fast Static Sites

Why content should be in the payload, not behind a JavaScript shell. What fast actually means for a small site, and why this site is built the way it is.

The problem: shells that search engines and slow connections struggle with

Open a modern website and watch what happens. The browser downloads an HTML file that is mostly empty: a shell, a few script tags, and a blank container. Then it downloads JavaScript, runs it, fetches data, and only then renders the content you came for. On a fast connection with a fast phone, that takes a second or two and nobody notices. On a slow connection, on an old phone, or in a search engine's crawler, it takes much longer, and sometimes it never finishes at all.

Search engines have got better at running JavaScript, but "better" is not "reliable". A crawler that has to execute scripts to see your content is a crawler that can time out, hit a script error, or give up and index the empty shell. Bing in particular has historically been less patient with JavaScript-rendered pages than Google. If the content is not in the initial HTML payload, you are betting your visibility on a crawler's willingness to run your code. That is a bad bet for a small site with no team to monitor it.

Slow connections have the same problem from the other side. A shell plus a framework plus data is three round trips before the first word appears. A static HTML page is one. On a phone in a rural area, on a train, or on a capped data plan, the difference between one round trip and three is the difference between reading the page and closing the tab.

The static answer

A static site is the opposite approach. The content is in the HTML file, written out in full, when the server sends it. The browser renders it immediately, with no JavaScript required. One stylesheet handles the design. There is no backend, no database, no server-side rendering step, and nothing to time out.

This does not mean the site is primitive. A static site can have any layout, any typography, and any content a server-rendered site can have. What it cannot have is content that changes per visitor, or content that depends on a database query at request time. For a personal site, a product site, a documentation site, or a blog, that is rarely a real limitation. The content changes when the author changes it, not when a visitor arrives.

The trade-off is honest work. A static site means writing HTML, or generating it from a build step, instead of letting a framework assemble it at runtime. That work is visible and boring, which is why it is unfashionable. But it is work that pays off every time someone loads the page: the page is fast, it works without JavaScript, it works in every crawler, and it keeps working when the framework of the year is abandoned.

What "fast" actually means

Fast is not one number. It is three things, and they matter in this order.

Payload size

How many bytes the browser has to download before it can show the page. A static HTML page with one stylesheet is tens of kilobytes. A framework shell with its JavaScript bundle is often hundreds of kilobytes before the content even arrives. Smaller payloads load faster on every connection, and they cost less data on capped plans.

No render-blocking JavaScript

Whether the browser can render the page before the JavaScript finishes. On a static site, there is no JavaScript to block rendering, so the content appears as soon as the HTML arrives. On a shell site, the content waits for the script, and the script waits for the data, and the data waits for the network.

Cacheable

Whether the page can be cached and served again without rebuilding it. A static file can be cached at every level: the browser, the CDN, the edge. A server-rendered page can be cached too, but only with care, and only if the caching layer knows when the content changed. A static file is cacheable by default, because it does not change until someone replaces it.

There are other measures, Largest Contentful Paint, Cumulative Layout Shift, Time to First Byte, and they all improve when the payload is small, the rendering is unblocked, and the caching is simple. The point is not to chase a score. The point is that a page that arrives as HTML, renders immediately, and caches cleanly is fast in every measure that matters, without any optimisation work.

This site as the worked example

This site is a static site. Every page is an HTML file with its content written out in full. One shared stylesheet handles the design. No JavaScript renders the content: the only script on the site is the analytics snippet, which loads after the page and is not needed to read it. What the analytics snippet collects, and what it does not, is set out on the Privacy page. There is no framework, no build-time data fetching, and no server-side rendering. The navigation is plain links. The footer is plain HTML. The diagrams on the printer guides are inline SVG, part of the page, not fetched separately.

That is a deliberate choice, and it is the same choice behind the print guides. A test page has to be trustworthy, and a web page has to be readable. Both are served by putting the content in the payload and getting out of the way. The design system for this site, Space Grotesk for headings, Inter for body, JetBrains Mono for labels, warm paper background, one signal blue, is carried by a single stylesheet, and the whole site works if that stylesheet fails to load, because the HTML is readable on its own.

The result is a site that loads in one round trip, renders immediately, works in every crawler, and can be hosted anywhere that serves files. It is not impressive technology. It is the absence of technology, and that is the point.

When static is the wrong choice

Static is not always the answer, and it is worth saying when it is not. If the content changes per visitor, a logged-in dashboard, a personalised feed, a shopping cart, a static site cannot do it without a backend, and pretending otherwise means bolting on JavaScript until the static site is a shell site with extra steps. If the content updates many times a day from many authors, a static build step can become a bottleneck. If the site needs real-time data, a live feed or a collaborative editor, static files are the wrong tool.

The question is not "static or dynamic". The question is "does this content change per visitor or per minute". If the answer is no, static is the simplest thing that works, and the simplest thing that works is usually the fastest, the most reliable, and the easiest to maintain. For a personal hub, a product site, and a set of guides, the answer is no, and static is the right choice.

Related reading on this site: the print CSS essay, on making web pages print cleanly, and the essay on building small tools, on the one-job philosophy behind the products.