this post was submitted on 12 Feb 2026
11 points (59.3% liked)

JavaScript

2655 readers
122 users here now

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] nykula@piefed.social 13 points 15 hours ago (1 children)

JavaScript has been my favorite language for a decade. Still, I try to make websites server-rendered so that they can be read if my code fails to load or execute. For example, there are power outages in Ukrainian cities for most of the day because of the war. When there's no power, there's still 4G for a while but it switches to economic mode and slows down to a crawl. The websites of the monopolist energy company require a lot of JavaScript. It often fails to load for me during the outage. It's also not keyboard-accessible because of how its JS is implemented (I won't image I'd do better, they have a team while I'm a solo programmer, but I try and they don't). For me to see when there will be electricity at what place and plan where to go study and work, I have to rent a VPS, scrape their website and show me a static table that doesn't require JS to load. Some code to see what I mean: https://codeberg.org/nykula/powerup

[–] dan@upvote.au 4 points 14 hours ago (1 children)

JavaScript has been my favorite language for a decade. Still, I try to make websites server-rendered so that they can be read if my code fails to load or execute

Have you tried Astro? It's good for exactly this. You write Astro components that look a little bit like React components, but they're all rendered either during the build (when using static site generation) or server-side.

You get the developer experience of a modern JS framework, with the output of a static site with minimal JS.

[–] nykula@piefed.social 4 points 13 hours ago

Yes, I tried multiple popular SSR frameworks and use one at work. As a hobby, I've been making my own SSR framework that is much more minimal, based on Preact, Valibot, Vite, node:sqlite, URLPattern, gettext.js and a few companion libraries. (But components look more like old-school Mithril than React because no JSX extension, just standard JS.) I want its node_modules to stay below 200 MB and to pick such dependencies that the apps built with it can be included in Debian repositories and potentially FreedomBox. Hopefully I'll be ready to make a fedi post about it next month.