Technology

Ship Zero JavaScript and Let the Browser Do What It Already Knows

How we stopped building single-page apps for everything and started letting the web be a document again.

Priya Nakamura November 14, 2022 8 min read

Last January I rebuilt our marketing site in a popular component framework. The Lighthouse score fell from 94 to 47, and the footer took a full second to render on a midrange phone.

That search led me to islands. Most of a page is static content: headings, paragraphs, images, links. Only a small fraction needs interactivity, so the browser should not hydrate an entire document to power one search bar.

The cost nobody talks about

The old page shipped 218KB of JavaScript for a long article and one signup form. After the rewrite, it shipped 14KB. The island loaded independently while every paragraph rendered as plain HTML.