A Week With JavaScript Off: What Actually Broke on My Portfolio
Photo: And85rew, CC BY-SA 4.0, via Wikimedia Commons
I did not do this because I have strong feelings about progressive enhancement. I did it because a friend opened my site on a locked-down work laptop, told me the menu did nothing, and I did not believe him.
So I disabled JavaScript — a fresh Firefox profile, javascript.enabled set to false, no extensions, no cache — and used my own portfolio for seven days as my actual homepage. Here is the damage report.
The rules I set for myself
No peeking at the source in another tab to see what should have happened. No falling back to a JS-enabled browser to get something done. If a page did not work with scripts off, it was broken, and I wrote it down with the time and the URL. Seven days, log every failure, fix nothing until day eight.
The log ended up with 23 entries. Nine of them were the same problem wearing different hats.
Day 1 and 2: the navigation is a lie
First click of the week, and the site failed.
My main nav items were <button> elements wired to a router. On desktop the header links were real anchors, but the mobile menu was a button with a click handler — and so was the theme toggle, and so was the little jump to section rail on long posts.
The mobile menu was the bad one. With scripts off, tapping the hamburger did absolutely nothing. No error, no flash of content, just a page that ignored you. That is worse than an ugly unstyled page, because at least an unstyled page still works.
The fix, day eight: the mobile menu became a <details> and <summary> pair with the nav inside. Ships with zero JavaScript, keyboard accessible out of the box, and I deleted 31 lines of my own code in the process. The section rail became plain anchor links with scroll-behavior: smooth in CSS, which degrades to a jump, which is fine.
Day 3: the contact form survived, and I was weirdly proud
The surprise was the contact form. I had built it on a managed form backend that accepts a regular POST with a name attribute on every field, and — crucially — I had set action and method on the <form> element instead of routing everything through fetch.
Result: it submitted fine, rendered the confirmation page, and delivered the email. My own AJAX version with inline validation was a nicer experience, but it was an upgrade, not a requirement. When I checked my sent mail that week, three of the seven messages had come through the non-JS path and I had never known.
That is the pattern I came away with. The form was not accessible because I am principled. It was accessible because the backend platform defaulted to it and I was too lazy to override it.
Day 4: fonts, images, and the flash
Two things happened here.
First, my webfont loading was handled by a script that added a class once the font had loaded. Scripts off meant the class never landed, which meant the fallback font stayed. Honestly? It looked fine. Slightly chunkier headings, slightly wider line heights, but readable and — this is the part that stung — it rendered faster and the layout did not shift at all.
Second, my lazy-loaded images never loaded. Not lazily. Never. I had used a script-based intersection observer for the project grid instead of the loading attribute on the image tag. Every project thumbnail on my homepage was an empty gray rectangle.
The fix: loading and decoding attributes on the images, a font-display rule on the webfont, and a system font stack as the base. The script that used to swap fonts disappeared entirely.
Day 5: the demos
This was my one genuine casualty. I embed a couple of live canvas experiments on project pages, and they are, by nature, JavaScript. There is no version of a particle simulation that runs without scripts.
I did not try to fix that with a heroic fallback. I added a static screenshot of each demo with a link that says Open the live demo — and the link opens a dedicated page where the script is the whole point. The project page still tells you what the thing is, what I learned, and what it looks like. That felt like an honest compromise instead of a workaround.
Day 6: analytics and the theme toggle
The theme toggle did nothing, which I expected. I shipped it as a <button> that toggles a class. Two options existed: build a checkbox-based CSS-only toggle, or accept that dark mode is a preference enhancement for people whose browsers run scripts.
I went with the CSS-only toggle in the header and kept the stored preference in localStorage for the scripted path. It took forty minutes and now the site respects prefers-color-scheme on first load with no script at all.
Analytics simply did not fire that week, and I want to be transparent about something: my traffic numbers for those seven days are wrong. That is also true of every ad blocker, every privacy browser, and every reader who has decided my analytics script is not welcome. I now treat my numbers as a minimum, not a total, and it has made me calmer about the whole thing.
The speed numbers
I ran the same five pages through Lighthouse, scripted and unscripted, cold cache, same connection.
| Metric | With JS | Without JS |
|---|---|---|
| Largest contentful paint | 2.1s | 0.9s |
| Total page weight | 486 KB | 121 KB |
| Requests | 24 | 6 |
| Main thread blocking | 340ms | 0ms |
I did not set out to make a fast site. I set out to make a site that survives a locked-down laptop. It turns out those are the same project, and the speed was a side effect of deleting things instead of optimizing them.
Day 7: what I took away
I am not going to tell you to build everything without JavaScript. I use frameworks. I like client-side routing. My day job would be impossible without the language.
What I will say is that my portfolio was held together by scripts in ways I had never audited, and every one of those joints was a place where a stranger could quietly hit a wall and leave without telling me. Fixing the nine real failures took about six hours total, spread across a weekend.
Six hours to make sure the site works on a work laptop, a hospital kiosk, a farm-country DSL line, and whatever weird setup the next person is running. That is not a philosophy. It is just cheap insurance, and I should have bought it years ago.