Most websites out there could work fine without JavaScript. They rely on it because they can’t be bothered to be better.
Comment on nobody in webdev knows what graceful degradation is anymore
Korne127@lemmy.world 3 weeks ago
I, as a user, should be able to switch off javascript and have the site work exactly as it does with javascript turned on.
I mean… many websites rely on JavaScript, so it’s kind of obvious that they don’t work without it. If it would work without JS in the first place, the website wouldn’t need to embed any JS code.
bjoern_tantau@swg-empire.de 3 weeks ago
rigatti@lemmy.world 3 weeks ago
What would they do instead?
ackthxbye@feddit.org 3 weeks ago
How about serving a proper HTML that contains the data they want to display? Instead of an empty page that tries to load the data via JavaScript.
chunes@lemmy.world 3 weeks ago
I miss when JS was just a silly thing you could use to add trails to the mouse cursor to impress anyone who stumbled onto your geocities page
possiblylinux127@lemmy.zip 3 weeks ago
They could just add a text box that says please enable JavaScript.
MonkderVierte@lemmy.zip 3 weeks ago
possiblylinux127@lemmy.zip 3 weeks ago
It is a lot simpler to just require JavaScript. It is widely supported and is default enabled on all platforms and browsers.
SpaceNoodle@lemmy.world 3 weeks ago
When I ask a server for a page, it should give me content, not a shitty script and a note that says “here, you do it.”
possiblylinux127@lemmy.zip 3 weeks ago
Have you ever tried building a modern page without JavaScript.
You can do a lot of things with HTML5 and CSS. It just is very complicated and painful. It isn’t intuitive and the behavior will vary across browser.
bjoern_tantau@swg-empire.de 2 weeks ago
Yes, that’s my job.
The point isn’t to emulate the JavaScript functionality somehow. The point is to simply fetch the desired information as a new page load when necessary. The page should work in lynx.
Swedneck@discuss.tchncs.de 1 week ago
sure, it’s painful and pointless to build a fucking virtual machine without JS, but you can do 95% of normal website things with pretty bog standard HTML+CSS these days. You don’t even have to fiddle about to do pretty complex things, that’s just built-in most of the time.
adarza@lemmy.ca 3 weeks ago
website wouldn’t need to embed any JS code.
other than the 20 trackers and ad scripts.
Azzu@lemmy.dbzer0.com 3 weeks ago
There’s a difference between “wouldn’t work” and “wouldn’t work as nicely”. That’s what this post is about :D Most websites would still work in the same basic way without js.
Kazumara@discuss.tchncs.de 3 weeks ago
OP really muddled the waters by writing:
exactly as it does with javascript turned on
That’s obviously impossible and wouldn’t be degraded.
cupcakezealot@piefed.blahaj.zone 3 weeks ago
exactly as it does aka forms submit, logging on works, you can achieve the same thing
Kazumara@discuss.tchncs.de 2 weeks ago
It’s either exactly the same, or it’s gracefully degraded. You’re asking for two opposite things at once.
For what it’s worth I support the notion that fundamental functionality should be supported without Javascript, with good old form submissions.
But I also recognise that you can’t get the exact same behaviour without javascript initiated background GETs and POSTs. Easy example: A scrollable map that streams in chunks as you move it.
axEl7fB5@lemmy.cafe 3 weeks ago
form validation is dogshit without js
possiblylinux127@lemmy.zip 3 weeks ago
Why would someone spend tons of time on something that isn’t needed? Only a few people even know how to turn off JavaScript and chances are they will just turn it back on since nothing works.
MonkderVierte@lemmy.zip 3 weeks ago
so it’s kind of obvious that they don’t work without it.
Uhm, the web is to share content, not to play JS. That’s what graceful degradation is for: the primary usage should still work.
Korne127@lemmy.world 3 weeks ago
Uhm, the web is to share content, not to play JS
The web doesn’t have a single unified purpose. Even if I hate it as a programming language, JavaScript if the basis almost all client-side browser operations build upon.Sure, a simple website which just contains information works without it, but if you design a website in which the client does anything interactively and not everything should be processed server-side, it’s not really possible. No matter if you’re talking about a web game, something like Google Earth or an in-browser editor.
MonkderVierte@lemmy.zip 3 weeks ago
All examples that work worse than a native software.
veniasilente@lemmy.dbzer0.com 2 weeks ago
the website wouldn’t need to embed any JS code.
That’s the point.
cupcakezealot@piefed.blahaj.zone 3 weeks ago
which is the problem that most people don't understand the concept of graceful degradation