Building a Zero-JavaScript Blog with Island Architecture: What Next.js 15 Actually Ships
This blog runs on Next.js 15.5 and React 19.2. The plan I wrote for it on November 9 set a 0 KB JavaScript baseline: pages render on the server, and the three interactive features (a reading progress bar, footnote popovers, and copy buttons on code blocks) load only on posts that ask for them in frontmatter. The third of those landed today, so I built the site and measured what a browser actually downloads.
The short answer: the islands work as designed and cost 1.2 to 1.9 KB each, but the baseline is about 108 KB, not zero. Every page, including one with no interactive features at all, loads React DOM and the Next.js App Router runtime. On the App Router, "zero JavaScript" works as a budget for your own code, and the page carries the framework's runtime on top.
The goal
The plan had three rules:
- A post made of prose and code blocks should need no client JavaScript.
- Interactive features enhance a page that already works. With JavaScript disabled, the post is complete.
- A post pays only for the features it declares.
The second and third hold up. The first is what this post is about.
What a page actually loads
I built the site with next build, served it with next start, and loaded each page in headless Chromium through Playwright. After scrolling to trigger anything lazy, I summed transferSize for every script in the Resource Timing API:
const scripts = performance
.getEntriesByType('resource')
.filter((r) => r.initiatorType === 'script' || r.name.endsWith('.js'))
const transferred = scripts.reduce((sum, r) => sum + r.transferSize, 0)
const uncompressed = scripts.reduce((sum, r) => sum + r.decodedBodySize, 0)That is compressed bytes on a cold cache, one run per page, on localhost:
| Page | Islands | Scripts | Transferred | Uncompressed |
|---|---|---|---|---|
/about | none | 7 | 108.4 KB | 355.8 KB |
/ (post list) | none | 8 | 110.1 KB | 359.9 KB |
| A post | progress | 9 | 111.3 KB | 360.8 KB |
| A post | progress, copy-button | 10 | 113.1 KB | 364.1 KB |
The build output agrees. next build reports "First Load JS shared by all: 103 kB", nearly all of it in two chunks of 45.9 kB and 54.4 kB, which are React DOM and the App Router's client runtime. The remaining few KB are webpack's chunk loader, the root layout, and the navigation bar, which is a client component because of its mobile menu.
Why Server Components don't get you to zero
Server Components keep component code off the client. A server component's code never ships; only its rendered output does. What they don't remove is the runtime that receives that output.
An App Router page arrives as HTML plus a serialized React Server Components payload. React on the client hydrates against it so that any client component in the tree can attach, and <Link> uses the same machinery to navigate by fetching payloads instead of full documents. That runtime loads whether or not the page contains a client component. I didn't find a supported way to turn it off in the App Router.
So on the App Router, a 0 KB target can only apply to your own code. If a literal zero matters, pick a framework that makes it the default (Astro ships no client JavaScript unless a component opts in) or give up client-side navigation. I'm staying on Next.js for now and treating 108 KB as the floor. The shared chunks are cached after the first page view, so a reader who opens several posts pays it once; I haven't measured repeat visits.
How islands opt in
A post lists its islands in frontmatter:
---
title: "Post Title"
islands: [progress, sidenotes, copy-button]
---The Zod schema restricts islands to those three names, so a typo fails the build. The post page renders a small loader for each declared island:
'use client'
import dynamic from 'next/dynamic'
// Lazy-load ProgressBar island (client-only)
const ProgressBar = dynamic(
() => import('./ProgressBar').then((mod) => mod.ProgressBar),
{ ssr: false }
)
export function ProgressBarLoader() {
return <ProgressBar />
}next/dynamic gives the island its own chunk, and ssr: false means the server renders nothing for it. The browser requests the chunk after hydration, and a post that doesn't declare the island never requests it. Copy buttons work the same way, with one loader per code block, rendered only when copy-button is in the list.
What each island costs
Measured the same way, as the size of the island's own chunk:
| Island | Transferred | Without JavaScript |
|---|---|---|
progress | 1.2 KB | No bar; nothing else changes |
copy-button | 1.9 KB | No button; select the code and copy it |
sidenotes | 1.5 KB | Footnote markers are anchor links to the notes at the bottom |
No published post uses sidenotes yet, so that row comes from a draft test post. All three are inside the plan's budget of about 2 KB per island. On a page with all three, they add under 5 KB to the 108 KB floor, about 4% of what the page loads.
The progress bar needed one fix for mobile. Updating its width from a scroll listener with a CSS transition stuttered on iOS Safari and Chrome on Android. It now updates inside requestAnimationFrame with a passive listener and no transition, and the fixed-position bar gets transform: translate3d(0, 0, 0) to keep it on its own compositor layer. I don't have a measurement for the difference.
Moving work to the build
Most of what a content site might do in the browser happens once, during static generation:
- MDX. The post page compiles each post with
@mdx-js/mdx(compile, thenrun) inside a server component.@next/mdxis configured innext.config.mjstoo, but it only handles.mdxfiles imported as pages, and the posts don't go through it. - Syntax highlighting. Shiki, through
rehype-pretty-codewith thegithub-darktheme, emits plain spans with inline colours. It uses TextMate grammars, the same ones VS Code uses. It replaced highlight.js (viarehype-highlight), which also ran on the server, so the switch was for output quality and changed nothing on the client. - Frontmatter. A Zod 4 schema validates every post at build time, and a bad field fails the build. The test suite post covers how that schema is tested.
Keeping it true
The Playwright suite checks three things:
- With JavaScript disabled, the post renders and the progress bar is absent.
- On a post that doesn't declare sidenotes, no sidenote chunk is requested.
- On a post with two islands, the island chunks together stay under 20 KB.
These run in the test suite; next build itself doesn't check budgets. No test looks at total script bytes either, so a change in the framework floor would go unnoticed.
So what?
| Goal | Result | Verdict |
|---|---|---|
| 0 KB JavaScript baseline | About 108 KB of framework runtime on every page | Not achievable on the App Router |
| Readable without JavaScript | Every island falls back to plain HTML behaviour | Met |
| Pay only for declared features | 1.2 to 1.9 KB per island, loaded only when listed | Met |
| Budget enforcement | E2E test on island chunks; framework floor untested | Partial |
If you're planning a server-first site on the App Router:
- Measure the floor first. Build an empty page and read "First Load JS shared by all" before you write a budget.
- Budget your code and the framework separately. The island budget is useful. A page budget that pretends the runtime isn't there is not.
- Test the total. A test that sums every script on a page shows the floor and catches it when it moves.
- Pick the framework for the requirement. If zero is a hard requirement, choose a framework that makes zero the default.
Next on my list is that total-bytes test, so the floor is visible when it moves.