~/notes $ cat no-js-websites.md


The art of crafting for the web (without JavaScript)

A deep dive into the art of crafting for the web without JavaScript

Why would someone, in 2026, with a sane state of mind (as sane as it can be) build a website without JavaScript?

And by JavaScript I also mean TypeScript or other shenanigans.

For couple of years now I've been building software, although focused on the backend technologies I've dwelled in the obscene frontend shitfuckery scene more times than I'm happy to admit.

If you haven't already worked as a "full-stack" developer then congrats, you're on the right track.

This is a whole different discussion but, "full-stack" is just a term used to describe a developer that works double (if not more), for less than what they would get by focusing into a single "side".

Anyways, the point of this note is why to ditch on JavaScript and go for a no-JS approach.

Bloat. Bloat everywhere.

Let's build this note-keeping website, you would probably reach for something like Astro, if not an idiot since this is a SSG website anyways, right?

Then you go and install the thing, and you're off to a node_modules directory that takes up half of your disk space (dramatic exaggeration).

You try to go leaner, and create a Elysia or god forbid Express server plus a React SPA.

Now you have two things running, double the bloat. Congrats, you fooled yourself!

And good luck going with anything SSR/SSG capable with batteries included, like TanStack Start, SvelteKit, Next.js, Nuxt.js, and whatnot.

For SSR you can still kinda go MDX and avoid a database, but the average AI-rotted brained dev will most likely go with a database + cache + object storage over-engineered solution.

They want to scale from 0 to 1 users and need an entire cloud ahh setup.

How does one escape the bloat truly?

Reject Modernity, Return to Monke.

Use C to build a CGI server and... SIKE!

But really, you don't need to go full caveman to get some great results already, for example: htmx and alpine.js. They can even work together to provide a very nice experience with some minimal JavaScript overhead.

You can just write a plain server application, have it serve some HTML templates, like something based on Jinja2 or Django templates. Wire some HTMX here, some Alpine.js there, and you have a nice website that doesn't require you to jumble together 2 GiB of node_modules for a simple SSG blog.

And for more interactive websites I can defend the usage of such libraries, and even some tailwindcss if you are afraid of writing your own CSS.

But for the very simple ones, you can just write a few lines of HTML and CSS, and you have a nice website that doesn't require any JavaScript.

CSS can do a lot of things based on hidden state of forms and other obscure techniques. You can have some high degree of interactivity without any JavaScript.

And using pure HTML forms and some auto-refresh rules you can even simulate a live page! Ever wonderer how that sneaky darknet devs build their websites when no sane darknet user would ever enable JavaScript on Tor? That's how they do it.

I think most people when faced with this challenge would just give up and use JavaScript, while some might take up the courage but end up making the wrong decision and start the project with PHP, C# (goddamn ASP.NET or whatever its called nowadays), some cursed Java MVC (yeah Spring I'm looking at you), or even worse, Ruby on Rails.

But I'm here to tell you that you can return to monke, without feeling monke.

The answer is Rust.

Ah crap, here's the Rust evangelist at it again.

Actually, this was just to ragebait you into keep reading the thing. But you can use other languages to achieve this same results.

  • C/C++ with whatever the C guys are into today, it surely isn't JS;
  • Kotlin with Ktor + HTML DSL;
  • Go with templ;
  • Rust with Axum + Askama;
  • Python with Flask + Jinja2;
  • ...and many others!

The idea of using Rust is because it's god damn fast, and you can use it to build high-performance web servers that run on less than 256MiB of RAM and less than a shared vCPU worth of resources. Making such deployment very cheap, if not free!

Rust is also very nice to work with, the type system makes sense, the compiler helps quite a lot with catching bugs and making sure your code is safe, and the ecosystem today is strong and reliable.

As a matter of fact it took me one afternoon and a bit of the night to build this website you are browsing today.

And that's because I was using new libraries I haven't used before, like: askama, gray_matter, and comrak to name a few.

Total, this project uses only 13 dependencies on the production build.

With the advantage of being self-contained, produce a very small binary of about 7 MiB, and a 18 MiB docker alpine image (uncompressed).

All I have to do in order to create or update a post is to create the markdown file and and run fly deploy to deploy the updated version. It's very fast and the deployment process is automated. I timed it, it takes 3:18 minutes to deploy.

Faster than any fancy CI/CD pipeline or DevOps bullshit.

Simple. Reject modernity. Return monke.

What is this about after all?

You can argue that the design of this website is so boring and monotonous that you want to puke. But it was deliberately designed to be simple and minimalistic. It's not a skill issue ok?

The point of this note, was to bring this vision that it's possible to build nice web applications without all the bloat, namely JavaScript.

As a matter of fact, my custom git hosting portal will probably be done using the same technique. As I don't see myself over-engineering this project to the point of needing HTMX and/or Alpine.js.

I hope you enjoyed today's note, and I look forward to sharing more with you.