Readit News logoReadit News
YannickR commented on Converting an online game to work without any JavaScript   bejofo.com/blog/no-js-gam... · Posted by u/YannickR
Dwedit · 6 days ago
The trend to CDNs serving static content means that Javascript becomes far more important than before, so "no-javascript" sites are at a huge disadvantage.

For instance, you can load up the same static page for everybody, then after it's loaded, serve some small personalized Javascript that refers to your particular user account which then customizes the page.

YannickR · 6 days ago
I realized this during my exercise: I had to completely disable pre-rendering in SvelteKit for the account system to work without JS, since I want to show the username for logged in users.
YannickR commented on Converting an online game to work without any JavaScript   bejofo.com/blog/no-js-gam... · Posted by u/YannickR
andai · 6 days ago
>Whether websites have to work without any JavaScript at all is a question almost as old as the web itself. By now, the answer is clear: No, they don’t. It’s firmly established that websites should be more than just structured and styled text. JavaScript execution is an integral part of (almost) every browser.

The page this text is on, proves that isn't true!

YannickR · 6 days ago
You‘re absolutely right, not every web page „should“ include interactive elements.

What I wanted to express is that web pages shouldn’t be forced into being only structured styled Text and instead should be encouraged to embrace interactivity.

YannickR commented on Converting an online game to work without any JavaScript   bejofo.com/blog/no-js-gam... · Posted by u/YannickR
o11c · 6 days ago
The "refresh causes load" issue can be solved by doing long-polling instead of short-polling.

Note that the http-equiv refresh will only trigger after the page is fully-loaded, which long-polling does not allows to happen, so you do have resilience for the case where the long-poll is interrupted mysteriously.

YannickR · 6 days ago
I haven’t tried this yet, but if it works this would be a very smart solution to the problem, as it could potentially also reduce delays between turns.
YannickR commented on How I Made My Online Game Work Without JavaScript and Why You Probably Shouldn't   bejofo.com/blog/no-js-gam... · Posted by u/YannickR
YannickR · a month ago
Hi HN!

I think I stumbled into this undertaking when I first tried out SvelteKit. Their documentation promotes progressive enhancement and it got me wondering, would that work even for a game with real-time updates? What would it look like?

u/YannickR

KarmaCake day12July 21, 2025View Original