htmx.org solves the problem of full page loads. Yes, it’s a JavaScript library, but it’s a tiny JS library (14k over the wire) that is easily cached. And in most cases, it’s the only JavaScript you need. The vast majority of content can be rendered server side.
Comment on The sheer amount of websites that are completely unusable without JavaScript
Cerothen@lemmy.ca 1 day agoThat would make the website feel ultra slow since a full page load would be needed every time. Something as simple as a slide out menu needs JavaScript and couldn’t really be done server side.
expr@programming.dev 1 day ago
Cerothen@lemmy.ca 1 day ago
While fair, now you have to have JavaScript enabled in the page which I think was the point. It was never able having only a little bit. It was that you had to have it enabled
expr@programming.dev 13 hours ago
Yes, it is unfortunate that this functionality is not built-in to HTML/browsers to begin with. The library is effectively a patch for the deficiencies of the original spec. Hopefully it can one day be integrated into HTML proper.
Until then, HTMX can still be used by browsers that block third party scripts, which is where a lot of the nasty stuff comes from anyway. And JS can be whitelisted on certain sites that are known to use it responsibly.
XM34@feddit.org 1 day ago
So, your site still doesn’t work without JS but you get to not use all the convenience React brings to the table? Boy, what a deal! Maybe you should go talk to Trump about those tariffs. You seem to be at least as capable as Flintenuschi!
unwarlikeExtortion@lemmy.ml 1 day ago
JS is just a janky hotfix.
As it was, HTML was all sites had. When these were called “ugly”, CSS was invented for style and presentation stuff. When the need for advanced interactivity (not doable or too slow on Internet speeds of 20-30 years ago), someone just said “fuck it, do whatever you want” and added scripting to browsers.
The real solution came in the form of HTML5. You no longer needed, and I can’t stress this enough, fucking Flash to play a video in-browser. Other things as well.
Well, HTML5 is over 15 years old by now. And maybe the time has come to bring in new functionality into either HTML, CSS or a new, third component of web sites (maybe even JS itself?)
Stuff like menus. There’s no need for then to be limited by the half-assed workaround known as CSS pseudoclasses or for every website to have its own implementation.
Stuff like basic crat stuff. HTML has had forms since forever. Letting it do some more, like counting down, accessing its equivalent of the Date and Math classes, and tallying up a shopping cart on a webshop seems like a better fix than a bunch of frameworks.
Just make a standardized “framework” built directly into the browser - it’d speed up and lower development complexity, reduce bloat and increase performance. And that’s just the stuff off the top of my head.
Sir_Kevin@lemmy.dbzer0.com 1 day ago
Something as simple as a slide out menu needs JavaScript and couldn’t really be done server side.
I’m not trying to tell anyone how to design their webpages. I’m also a bit old fashioned. But I stopped making animated gimmicks many years ago. When someone is viewing such things on a small screen, in landscape mode, it’s going to be a shit user experience at best. That’s just my 2 cents from personal experience.
I’m sure there are examples of where js is necessary. It certainly has it’s place. I just feel like it’s over used. Now if you’re at the mercy of someone else that demands x y and z, then I guess you gotta do what you gotta do.
Limonene@lemmy.world 7 hours ago
A slide out menu can be done in pure CSS and HTML. Imho, it would look bad regardless.
OP is trying to access a restaurant website that has no interactivity. It has a bunch of static information, a few download links for menu PDFs, a link to a different domain to place an order online, and an iframe for making a table reservation.
The web dev using javascript on that page is lazy, yet also creating way more work for themself.