i absolutely hate how the modern web just fails to load if one has javascript turned off. i, as a user, should be able to switch off javascript and have the site work exactly as it does with javascript turned on. it’s not a hard concept, people.
but you ask candidates to explain “graceful degradation” and they’ll sit and look at you with a blank stare.
it’s not a hard concept, people.
Depends. Webapps are a thing, and without JavaScript, there isn’t much to show at all.
Websites that mostly serve static content though? Yeah. Some of them can’t even implement a basic one-line message that asks to turn on JavaScript; just a completely white page, even though the data is there. I blame the multiple “new framework every week” approach. Doubly so for sites that starts loading, actually shows the content, and then it loads some final element that just cover everything up.
It depends. Inertia.js can pre-render pages server side, so you don’t need JavaScript to see the content.
React can do SSR, too. The issue is that some sites actually means nothing if not dynamic. It makes sense to have SSR and sprinkle some JS on the client for content delivery, no issue there.
Ibuild pretty feature heavy CMS type sites, and though I always try to go HTML only first (I’m quite old school still), it’s almost impossible to escape JavaScript
Having said that, the entire “my website won’t even show anything on the landing page without JavaScript” should die a quick death already
It is substantially harder to make a modern website work without JavaScript. Not impossible, but substantially harder. HTML forms are not good at doing most things. Plus, a full page refresh on nearly any button click would be a bad experience.
The web isn’t just HTML and server side scripting anymore. A modern website uses Javascript for many key essentials of the site’s operation. I’m not saying that’s always a good thing, but it is a true thing.
It is no longer a reasonable expectation that a website work with JavaScript disabled in the browser. Most of the web is now in content management systems that use JavaScript for browser support, accessibility, navigation, search, analytics and many aspects of page rendering and refreshing.
The web isn’t just HTML and server side scripting anymore. A modern website uses Javascript for many key essentials of the site’s operation.
which is why the modern web is garbage
Love it when a page loads, and it’s just a white blank. Like, you didn’t even try. Do I want to turn JS on or close the tab? Usually, I just close the tab and move on. Nothing I need to see here.
React tutorial are like that. You create a simple HTML page with a script and the script generates everything.
I had to do a simple webpage for an embedded webserver and the provider of the library recommended preact, the lightweight version of react. Having no webdev experience, I used preact as recommended and it is a nightmare to use and debug.
Developers are still familiar with the concept, there are even ideas like server side rendering in react to make sites more SEO friendly.
I think the biggest issue is that there is very little business reason to support these users. Sites can be sued over a lack of accessibility and they can lose business from bad ux, so they are going to focus in those two areas ten times out of ten before focusing on noscript and lynx users. SEO might be a compelling reason to support it, but only companies that really have their house in order focus in those concerns.
I’ve spent the last year building a Lemmy and PieFed client that requires JavaScript. This dependency on JavaScript allows me to ship you 100% static files, which after being fully downloaded, have 0 dependency on a web server. Without JavaScript, my cost of running web servers would be higher, and if I stopped paying for those servers, the client would stop working immediately. Instead, I chose to depend heavily on JavaScript which allows me to ship a client that you can fully download, if you choose, and run on your own computer.
As far as privacy, when you download my Threadiverse client* and inspect network requests, you will see that most of the network requests it makes are to the Lemmy/PieFed server you select. The 2 exceptions being any images that aren’t proxied via Lemmy/PieFed, and when you login, I download a list of the latest Lemmy servers. If I relied on a web server for rendering instead of JavaScript, many more requests would be made with more opportunities to expose your IP address.
I truly don’t understand where all this hate for JavaScript comes from. Late stage capitalism, AI, and SAS are ruining the internet, not JavaScript. Channel your hate at big tech.
*I deliver both web and downloadable versions of my client. The benefits I mentioned require the downloaded version. But JavaScript allows me to share almost 100% code between the web and downloaded versions. In the future, better PWA support will allow me to leverage some of these benefits on web.
The matter is not javascript per se but the use companies and new developers do, if everyone used like you there would probably be no problem. A gazillion dependencies and zero optimization, eating up cpu, spying on us, advertisements…
And if you try and use an alternative browser you know many websites won’t work.
Problem is so many websites are slow for no good reason.
And JS is being used to steal our info and push aggressive advertisment.
Which part is unknown to you?
Problem is so many websites are slow for no good reason.
Bad coding is a part of it. “It works on my system, where the server is local and I’m opening the page on my overclocked gamer system”. Bad framework is also a part of it. React, for example, decided that running code is free, and bloated their otherwise very nice system to hell. It’s mildly infuriating moving from a fast, working solution to something that decided to implements basic language features as a subset of the language itself.
Trackers, ads, dozen (if not hundreds) of external resources, are also a big part of it. Running decent request blocking extensions (stuff like ublock origin) adds a lot of work to loading a page, and still makes them seems more reactive because of the sheer amount of blocked resources. It’s night and day.
Problem is so many trains are ugly for no good reason.
And steel is being used to shoot people and stab people aggressively.
I don’t understand why we are blaming the stealing info part on JavaScript and not the tech industry. Here is an article on how you can be tracked (fingerprinted) even with JavaScript disabled. As for slow websites, also blame the tech industry for prioritizing their bottom line over UX and not investing in good engineering.
Yeah, it should also work without browser exactly as it does with a browser
I thought graceful degradation in terms of web design was mostly just to promote using the latest current browser features but to allow it to fall back to the feature set of, say, 1 or 2 previous browser versions. Not to support a user completely turning off a feature that has been around for literal decades? I think what you’re promoting is the “opposite” side, progressive enhancement, where the website should mostly work through the most basic, initial features and then have advanced features added later for supported browsers.
Not OP, But welcome to my TED talk.
Supporting disabled JavaScript is a pretty significant need for accessibility features. None of the text browsers supported JavaScript until 2017, and there’s still a lot of old tech out there that doesn’t deal well with it.
It wasn’t until the rise of react and angular that this became a big deal. But, It’s extremely common now to send most of the website as code. And even scrapers now support JavaScript.
There’s no “minor point” clause on the term graceful degredation. At the same time, there’s no minimum requirement. Would it be good to be thorough and provide a static page? I’d say yes but it’s not like anyone is going to do that anymore.
The tables have turned, You can no longer live without JavaScript and now you need browsers that lie about your screen resolution, agent and your plugins because mega corps can sniff who you are by the slightest whiff of your configs.
And that’s NOT pretty cool
Thanks for the response, good points all around. The fingerprinting is the most convincing argument to me but I think the accessibility issue you bring up is more important.
i, as a user, should be able to switch off javascript and have the site work exactly as it does with javascript turned on
Not agreeing or disagreeing, but why?
I would word it as: I should not have to allow strangers to execute arbitrary code on my PC just so I can view some text and/or images.
Because big tech has ruined the internet and uses JavaScript among other things, to track you. Some people blame the plastic pollution on improper recycling when we know that’s exactly what the evil plastic industry wants us to do: blame the consumer. Similarly, people think it’s their responsibility to turn off JavaScript when they should be blaming big tech. Even if you get rid of JavaScript, they will just find other creating ways to track you (source). We have to fix the structures running the tech industry.
JavaScript is directly related to almost everything that makes browser tabs take up more RAM than a typical PC in 1998. There are ways to use it in targeted ways that improve responsiveness (objectively or subjectively). The web as it stands is so far beyond that justification that it’s almost laughable to even bring it up.
I run a personal blog with zero JavaScript; just HTML, CSS, and some pictures. Firefox’s memory snapshot says it uses <3MB on the homepage. Amazon’s homepage is currently giving me 38MB, and this comment section with the Alexandrite frontend is giving me 30MB. Those two may even be at the low end of what’s out there.
I run a personal blog with zero JavaScript; just HTML, CSS, and some pictures. Firefox’s memory snapshot says it uses <3MB on the homepage. Amazon’s homepage is currently giving me 38MB, and this comment section with the Alexandrite frontend is giving me 30MB. Those two may even be at the low end of what’s out there.
then you have outlook and google docs, which use a half a gigabyte of memory each.
Oh yeah. There’s no doubt that modern web tech stacks are inefficient slop - patchwork built upon patchwork.
However, JS has been included in every major browser for well over a decade. It’s industry standard at this point, so I found the position of expecting commercial services to be backwards compatible with a 1998 browser setup a little odd.
What do you think about WebGL apps?
I don’t have a fundamental problem with web apps having access to GPU resources. There’s obviously games that can benefit from that. Engines like Godot and Unreal can directly use a web stack as a build target. It makes sense there.
In general, I don’t have a fundamental problem with any of this being there provided the attack surface area can be managed. Which it isn’t, but that’s another discussion.
I have a problem with the tools being applied indiscriminately. I’d almost say that every site should start vanilla, and you’d have to specifically justify any use of JavaScript.
Microsoft Teams
Low-key I’m disagreeing
i, as a user, should be able to switch off javascript
Webdevs don’t care. They were vibe coding even before AI became a thing. It’s my personal opinion that they should not deserve to be called “developers”.
Nonono, the JS does the money thing before you get your content fix. It’s by design.
This is correct. Web dev is told to make sure ads load before content. They don’t want users that don’t generate profits.
So in this example, what’s the underling issue, shitty business requirements or JavaScript?
Yes.
You understand if most people stopped using JavaScript they would just find other ways to serve you ads, right? You can already be tracked without JavaScript.
Just because there are other ways to serve you ads does not at all mean we should not be able to not only stop at least one, but also the one which is most dangerous since it literally allows for RCE on all clients. by design.
The browser is supposed to be a sandbox environment for RCE. That’s why the sandbox part is important. Maybe instead of removing the RCE, we can lock down the sandbox better and reduce the amount of information advertisers can collect.
If you remove code execution in the browser, then many websites will need to ship desktop apps instead. So now you’ve bypassed the browser sandbox altogether and that application can do much more damage.
I’m not arguing that all websites need to execute in the browser, but without code execution in the browser, you remove a whole class of apps and the web becomes much less useful.
Edit: calling it RCE is also kinda obnoxious because at that point you might as well call everything RCE. By that definition, if I push a docker image update, do I have RCE inside any container pulling that image? If there’s a way to break out of docker or web browser sandboxing, by all means call it RCE, but this is not that.
Maybe instead of removing the RCE, we can lock down the sandbox better and reduce the amount of information advertisers can collect.
By all means but then someone do it, because it’s 2025 and even Firefox sends all this information that is absolutely not needed to show a webpage. It’s at least 25 years late by this point.
If you remove code execution in the browser, then many websites will need to ship desktop apps instead.
Which in quite more than just some cases would be good, precisely because some things should be native programs instead of requiring that the web browser basically provides all the tasks of the OS.
I don’t know anything about web development but, is it really fair to say it should work exactly the same with JavaScript turned off? If that were achievable why would it be there in the first place? I assume the graceful degradation concept is supposed to be that as you strip away more and more layers of additional functionality, the core functions remain or at least some kind of explanation is given to the user why things don’t work.
People do stuff in JavaScript that you really don’t need JavaScript for. You don’t need JS to display a store listing, for instance. Or a news page, or documentation, or even a search engine
Ok, I’m seeing this a lot and I get it, and despite my lack of expertise in the field I can sympathize with the sentiment. Perhaps those replies are answering more in the spirit of the post than the letter.
It’s just that the title asked if no one knew what this ‘graceful degradation’ concept was anymore and the text used the example specifically that the page should be exactly the same with or without JavaScript switched on which, without trying to be facetious, sounded kind of logically impossible.
As a web dev, I’ll say that yes, it is achievable. The problem isn’t what’s possible, but that we’ve trained new frontend devs in certain ways and given them certain tools. Those tools are being used in places they shouldn’t, and those same new frontend devs are failing to learn the fundamentals of HTTP and HTML.
React, for example, is a JavaScript framework that’s become incredibly popular in recent years. It’s meant for “single page applications”. I once made a control panel for a vacuum former with it, where you could turn on zones of heating and get the temperature updated in real time. You’re not expected to navigate away from that page while you’re using it. I think this is a good place to use React, though you could make the argument that it should be a native GUI app. (I’ll say that it isn’t that important; this thing runs fine on a Raspberry Pi 3, which is the target platform).
React is not a good option for an ecommerce site. You want to click on a product to check out its details. That means you’re going between very different views (pages) a lot. React increases complexity with no clear gain. An argument can be made for the address/payment/finalization steps. The money people like that because there’s a strong correlation between streamlining checkout and how often cash ends up in their hands.
A lot of those sites use React, anyway, for everything. Why? Because we’ve trained a bunch of new frontend devs so much on it that they have no idea how to make a site without React. This overspecialization has been detrimental.
I’m a full time React and React Native developer. Imo, the frustrations with react are when you server side render. React without SSR is much simpler. But you are 100% right about picking the technology that meets your project’s requirements.
However, let me play devils advocate. Why do you need to SSR your e-commerce site? To optimize your SEO? Seems to me that SEO lately is a lie we’re being sold to make it easier for LLMs to chew through the entire internet, including your SEO e-commerce site. Imo, search engines have stopped serving the consumer. If we forget the SEO component for a second, you could build a killer e-commerce site that uses React and deliver a great user experience. If this is all about SEO, then I’m sure there is lots of garbage we could inject into our projects that would boost SEO. We could add LLM written top 10 articles to a fake blog on our site that nobody actually wants to read, and boost our Google ranking.
It has nothing to do with SEO. We do server side rendering because it’s the simplest thing that works.
Yeah, it’s not a hard concept, it is an impossible concept.
It’s when you call someone a pathetic bottom bitch while wearing an evening gown.
I built an internal tool that works with or without js turned on, but web devs want something simple for them with a framework, which is why you have to download 100Mb just for a basic form page.