Notifio is a desktop app that watches rental search pages for new listings, and the site that sells it is 38 URLs of mostly static text. I measured a while ago that one of those text pages ships 1 MB of JavaScript, 45 per cent of it the error reporter and 155 KB of it an animation library present for one sliding word in the footer.
That post measured the bill. It did not answer the obvious follow-up: what do we get for it? So I loaded all 38 URLs twice in the same Chromium, once with scripting on and once with javaScriptEnabled: false, and diffed what a reader ends up with.
The diff
JS on JS off delta
visible characters 214,160 214,113 -47
document height (38 pages) identical on all 38 0
visible <button> elements 10 10 0
nav links (1280px and 390px) 4 4 0
footer links 14 14 0
Forty-seven characters. Out of 214,160. Every one of them on the home page.
Page heights matched exactly on all 38 URLs, down to the pixel, which is the part I did not expect. The usual no-JS failure on a React site is a layout that collapses because something measured itself on mount. Nothing here does.
The 47 characters are the animated mockups on the home page. With scripting on, the home page's innerText grows from 3,757 to 4,382 characters over six seconds as the four fake windows type their way through a demo script. With scripting off they hold the first frame, and the first frame is a real frame: a window with a search in it, a notification with a listing in it. They are only animated, not generated.
The three things that break
So JavaScript on this site buys four animations and these:
page buttons what they do
/ 2 "Start monitoring" and "Stop", inside the demo mockup
/pricing 1 "Buy now · £20"
/help 7 six FAQ toggles and "Send message"
--------------------
38 pages 10
Ten <button> elements on a 38 page site. Twenty-eight of the pages have none at all, and the 1,091 links I counted for the accessibility census are all plain anchors that work without any of this.
I clicked the six FAQ toggles on notifio.app/help in both modes and counted the text that appeared:
JS on: +876 characters of answers
JS off: +0
876 characters, which is 0.4 per cent of the site's text, is the entire content difference between a browser that runs our megabyte and a browser that does not. The answers are not hidden with CSS either, they genuinely are not in the HTML: that accordion unmounts its answers rather than hiding them, which is the one page out of thirty where we made that choice.
The other two are worse than missing text, because they look like they work.
Two forms, zero action attributes
Here is what the markup of both forms on the site looks like in the HTML we serve:
<form class="flex flex-col gap-3"> <!-- /pricing, the one that takes money -->
<form class="space-y-5"> <!-- /help, the one that takes support requests -->
No action. No method. Both are React onSubmit handlers and nothing else. And the contact form's four controls do not have name attributes either:
control type required name autocomplete
input text yes none none
input email yes none none
input text no none none
textarea - yes none none
A form with no field names cannot produce a useful request body even if something did submit it, so there was never a fallback here to lose. With scripting off I filled the form in, pressed Send message, and the browser did nothing at all: no navigation, no error, no message. The required attributes still fire, so you can get as far as a browser telling you the message field is required, and then the button is inert.
The same is true of the £20 buy button. The one control on the site that exists to take money is a type="submit" inside a form with nowhere to submit to, because the real work is a fetch to our checkout route in the click handler. Of the ten buttons, that one is the one I would least like to be decorative.
And zero noscript tags
$ grep -c "<noscript" html/*.html | grep -v ":0$" | wc -l
0
Nothing on any of the 38 pages tells a reader with scripting off that anything is missing. In the FAQ's case that is nearly harmless: the questions are still listed, and the same answers exist in the FAQPage structured data that a crawler reads, so the information is in the document, just not in the part a human can see. For the two forms it is a dead end dressed up as a control.
One correction to my own earlier post while I am here. I wrote that the interactive surface of these pages includes a mobile menu button. There is no mobile menu: I ran the nav at 390 pixels and at 1280 pixels, with scripting on and off, and got the same four links every time. The nav is a client component for one reason, a scrolled boolean that shrinks it after 20 pixels of scroll, and that effect is the entire thing JavaScript does on 28 of our pages.
What I am changing
Not the architecture. A static marketing site that reads perfectly without its JavaScript is the correct outcome, even if we arrived at it by accident rather than by discipline. The 11 of our 79 TypeScript files that say "use client" are the four demos, the nav, the footer, the accordion, the two forms, the price formatter and its context, and nine of those eleven are for motion or formatting rather than for content.
Two things do deserve fixing, and both are small:
- The contact form should have
action="/api/contact",method="post"andnameattributes on its fields, so that pressing Send message without JavaScript posts the message instead of silently discarding it. Our contact route already runs seven checks against the browser's four, so it is ready for a request that arrives the old-fashioned way. - The FAQ answers should be in the HTML and collapsed with CSS rather than unmounted, which also fixes the no-JS case for free.
Neither of those is why I ran the measurement. I ran it expecting to find out which parts of the site were quietly broken for a reader with a strict content blocker, and the answer turned out to be: 47 characters of animation, 876 characters of FAQ answers, and the two places where we ask the reader for something instead of telling them something.
If you want to try it, the pages are all public: the site hub, a guide, the pricing page and the help page are the four shapes the other 34 repeat. Everything except the buttons works with scripting disabled.
Top comments (0)