Why I Keep My Site's JavaScript to a Minimum
There is no client-side framework assembling this page as you read it. The HTML arrives complete from the server, the CSS does the layout and the colour, and the only JavaScript here is a few lines that toggle a theme or copy a snippet of text. It took a while to accept that a page can be finished when it reaches you, rather than becoming finished afterwards in your browser.
I keep the scripting on this site deliberately small, and I have come to think of it as a design decision rather than a technical one. The subjects I write about here — restrained layouts, typography, whitespace, colour, photography — argue for the same idea. What you leave out matters as much as what you put in, and a page that arrives in one request and renders immediately leaves the reader nothing to wait for.
This is a small personal domain with plans to grow into a proper home for writing and images: maybe a portfolio, maybe a place to keep notes on the craft. It is deliberately unglamorous. The temptation, as a site grows, is to add a carousel, a search box, a newsletter popup, a comment system that needs a database. Each addition brings a dependency, a bundle, and something that can break quietly while I am asleep.
My argument is not that JavaScript is bad. It is a capable language, and there are things on the web nothing else does as well. The argument is about proportion. A personal site should behave like a well-set page rather than an application, and the reader's device is the scarce resource. On a three-hundred-dollar handset kept for four years, over a link that drops in and out, proportion matters more than it does on a laptop with fibre.
Pages That Arrive Already Built
The first decision was architectural: build the pages ahead of time and serve plain HTML. Nothing is assembled in the browser, so there is no hydration step, where a framework re-creates markup the server already sent. The browser downloads a document, parses it once, paints. On a good connection that difference is invisible, which is exactly why it is easy to ignore and hard to give back later.
Regional Australia makes it hard to ignore. Plenty of premises outside the metropolitan suburbs are still on fixed wireless or satellite rather than fibre, and the gap between a fixed wireless node and a fibre-to-the-node in a nearby town matters when the page has to arrive in one piece. Add a phone tethered on a stretch of the Stuart Highway outside Alice Springs, or a train corridor between Melbourne and Geelong, and the arithmetic changes.
Data caps are the other local pressure, and they have not gone away. Some mobile plans still shape how a household behaves around large downloads, and an Australian roaming through Singapore is spending money on megabytes they did not choose. There is a particular frustration in watching a page you asked for on a train eat into next month's allowance.
None of this is exotic. The Australian Government Digital Service Standard, and the security guidance published through cyber.gov.au, both take the view that a public service has to work for people on old devices and slow links as much as for people with the newest hardware and fibre in the street. A personal site owes none of that, but it is a useful standard to borrow: build for the least capable device you can reasonably expect.
What a Kilobyte of Script Actually Costs
A script is not a document. The browser has to download it, decompress it, parse it, compile it, and only then run it, and everything it does competes with the main thread, the one handling scrolling, tapping and painting. On a fast laptop that is a few milliseconds of jank. On a mid-range Android from a few years back, parsing a large bundle can take long enough that a tap feels ignored.
Batteries matter here too, and an Australian summer makes it literal. Adelaide regularly passes thirty-five degrees, and a phone left on a dashboard in that heat throttles itself to protect the cell. A script that would have been cheap on a desk becomes expensive in a hot pocket. Profiling with the CPU slowed down, which the Chrome performance panel and WebPageTest both allow, is humbling: a number I assumed was negligible was not.
There is also the question of what a script does while it runs. Hydration, polling, third-party embeds, analytics tags firing after the page has painted — each spends attention the reader gave to the article. I watched a page that looked instant on my machine take two seconds to become usable on a phone, and the cause was a small library working behind a spinner nobody needed.
The Few Interactive Bits That Earn Their Keep
The scripts I keep can each be described in a sentence. A button that copies a code snippet to the clipboard. A toggle that switches between the light and dark colour schemes. A disclosure panel for long captions on photographs. Each is progressive enhancement: the page is complete without it, and the script only improves something that already works.
I wrote the worst-in-the-room guide after a stretch of work where I was plainly the least experienced person in the room, and the lesson stuck: shipping a small honest thing beats presenting a large impressive thing that half works. That is the test I apply to a script. If the platform already does the job, it is padding. If nothing else can do it, and it degrades cleanly when it fails, it earns its place.
CSS has quietly swallowed most of what scripts used to be asked to do. A disclosure is a details element. A menu is a checkbox and a sibling selector, or a button with :has(). Support queries make the rest safe to ship. The rule I have adopted is plain: when a script and a CSS solution are both possible, the CSS solution wins, because it cannot fail to load and it costs nothing to parse.
Where the Rest of the Design Comes From
With the scripting budget spent, the design has to come from somewhere, and here it comes from type, space and image. Typography is where a page like this is won or lost: one family at two or three sizes, a measure of sixty-odd characters, leading that gives the eye somewhere to rest. None of that needs JavaScript. Fluid sizing works with clamp() and container queries, and a grid lays itself out with CSS Grid.
Colour works the same way. The palette is narrow on purpose, and the dark scheme follows the operating system's preference by default, with a small toggle for anyone who wants the opposite; that toggle is the piece of script most visitors will ever run, a few lines setting an attribute on the root element. Photographs are the heaviest thing here, so they get real dimensions, modern formats with a fallback in a picture element, lazy loading below the fold, and captions written by hand.
You can see the same restraint on the site's front page, which is where most people land first. There is no hero slider and no animated logo, just a short introduction to the domain and some ideas about restraint in design. The restraint is the argument: a page that says a little can actually be read, while a page that says everything rarely is.
Keeping the Door Open for What Comes Next
The reason to care about this while the site is still small is that the decision gets more expensive later. A site built from plain documents can grow into a personal homepage, a writing archive, a gallery, a layout experiment, and that growth does not require rethinking the foundation. Static files move to any host without a rebuild, including a shared plan in Sydney or a university server in Melbourne.
Accessibility comes along for the ride. Fewer injected elements means fewer focus traps, fewer sudden announcements from a screen reader, fewer ways for a keyboard user to get stuck. A page of headings, paragraphs, images and links is easy to audit and easy to translate for readers in Perth, Darwin or Hobart. It is also easy to read on a phone held on a Sydney bus, which is where much of my own reading happens.
Security is simpler for the same reason. Fewer dependencies means fewer packages to patch, and patching is what the Australian Cyber Security Centre keeps telling organisations to prioritise, since an unmaintained library is a standing invitation. A site with a build step and a handful of dependencies has a maintenance calendar; a site made of documents and one stylesheet has almost none.
So the JavaScript stays small, on purpose, and I would rather spend the effort on what a reader actually notices: the shape of the type, the air around it, the colour of the background, the photograph and its caption. The script, where it exists, is there to help the page along. The page is the point.