Small sites and short trips - MaxBruges.com

šŸ“” Small sites and short trips

11 January 2025

Crafting little webpages for quicker connections.

Chances are you arenā€™t reading this from a satellite-connected oil-platform, deep in the North Sea, but if you areā€¦ youā€™re welcome.

Almost all[1] the HTML pages that make up this site weigh in at under 14 kilobytes.[2] Why does that matter? Because itā€™s much faster for our imaginary drilling friend.

An oil platform at night For those downloading from the sea šŸŽ¶

Itā€™s all terribly complicated, but 14kb is about the maximum amount of data you can wring from your first connection to a web-server[3]. That means that if your browser can fetch the key components of the webpage in one quick, 14kb round-trip, then you wonā€™t need to hang around waiting for the page to load as another round-trip gets underway.

This isnā€™t worth worrying about most of the time. But if youā€™re some poor soul living off a high-latency satellite connection, those round-trips add up: from laptop, to router, all the way up to a satellite in orbit, back down to a base-station, to a serverā€¦ then all the way back again. Not to mention the eye-watering data fees.

Iā€™ll admit, I donā€™t expect the deep-sea-oil-rig-engineer demographic to be a massive part of this siteā€™s audience, but itā€™s good to build something that is as accessible as possible, whatever connection youā€™re on. Nearly 100 million people came online for the first time last year, and most of those were on laggy mobile connections and slow hardware. Why waste their money, time and battery-life on junk?

More than that, limitations are good. Less is more, and killing your darlings - be they <HTML> tags or superflous adjectives - is a healthy practice for any creator. The magic 14kb mark is a precise, achievable target to aim at when building the site.

A still from ā€˜Kill Your Darlingsā€™ ā€œI saw the best webpages of my generation driven mad by React componentsā€

We get better at things when we have these sorts of clearly-defined and tangible goals. It contextualises decisions and provides a yardstick against which to measure the importance of things. Do I really need this chunk of Javascript here? Could this glob of inline css be squidged into a stylesheet?

I ended up writing a quick bash script to tighten up the measure-tweak-evaluate loop. All it does is cycle through the directory of webpages and flag up those over 14kb, but thatā€™s all it needs to do. You can download the script here

Bytesize script in action And this screenshot? Exactly 14kb, of course.

The real work, the editing, is what comes next. And in that spirit of brevity, Iā€™ll end here.


  1. bar the odd chunky Experiment ā†©

  2. As a point of reference: the entire blog section of this site is smaller than just the fonts that your browser downloads when you open the BBC.com homepage (7 different variants of Reith Sans? Really?). ā†©

  3. usually, but not the rule. Some light bedtime reading if youā€™d like to know more. ā†©