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.
You’re correct, and I’m going to explain how this happens. I’m not justifying that it happens, just explaining it.
It isn’t that no one knows what graceful degradation is anymore. It’s that they don’t try to serve every browser that’s existed since the beginning of time.
When you develop software, you have to make some choices about what clients you’re going to support, because you then need to test for all those clients to ensure you haven’t broken their experience.
With ever-increasing demands for more and more software delivery to drive ever greater business results, developers want to serve as few clients as possible. And they know exactly what clients their audience use - this is easy to see and log.
This leads to conversations like: can we drop browser version X? It represents 0.4% of our audience but takes the same 10% of our testing effort as the top browser.”
And of course the business heads making the demands on their time say yes, because they don’t want to slow down new projects by 10% over 0.4% of TAM. The developers are happy because it’s less work for them and fewer bizarre bugs to deal with from antiquated software.
Not one person in this picture will fight for your right to turn off JavaScript just because you have some philosophy against it. It’s really no longer the “scripting language for animations and interactivity” on top of HTML like it used to be. It’s the entire application now. 🤷♂️
If it helps you to blame the greedy corporate masters who want to squeeze more productivity out of their engineering group, then think that. It’s true. But it’s also true that engineers don’t want to work with yesteryear’s tech or obscure client cases, because that experience isn’t valuable for their career.
This has to be fixed though. I don’t know, how, but it’s an economic situation bringing enormous damage every moment.
And most of people it affects are, like me, in countries where real political activism is impossible.
This is the next thing that should be somehow resolved like child labor, 8-hour workdays, women’s voting rights and lead paint. Interoperability and non-adversarial standards of the global network.
enormous
It isn’t though. Thats the exact point. It’s a moderate effort that would prevent infinitesimal damage. That’s just not good math. People have to prioritize their time. If you have a numbers case to make about why the damage is so enormous, make it. That’s what it will take to be convincing: numbers.
It is. It’s like the medieval Sound Toll, you can’t measure it well enough because there are no trade routes between the Baltic and the North Sea other than the Sound, the Kiel channel is not yet a thing.
What should be fixed is people. The above described logic is true, it does really happen, and behind it is the idiot desire: to get more money. Not to make a better thing, not to make someone’s life better, not to build something worthwhile - in other words, nothing that could get me out of bed in the morning. When that’s the kind of desires fueling most companies and societies, all things will be going in all kinds of wrong ways
the idiot desire to get more money
Yes, but we don’t have to make a total caricature out if it. We all need to prioritize our time. That isn’t evil, or broken, or wrong. That’s just life.
Expand this, please. I am sure I did not get you
Developers having a narrower list of browsers to support is not ONLY about greed. You say it is NOT about making something that works to improve people’s lives. And I disagree with that.
You can’t build a good piece of software and try To support every client under the sun since the beginning of time. There is a reasonable point to draw some lines and prioritize.
So while greed is ONE factor, you seem to be saying it’s the only factor, and that people are stupid and broken for doing this. That’s going too far.
It’s unrealistic to expect perfection. Today people want comprehensive client support. Tomorrow they will be outraged at some bug. But few realize: you may have to pick between the two. Because having zero bugs is a lot more achievable if you can focus on a small list of current browser clients. That’s just a fact. The next day they will be upset that there are ads in the site, but it may be ad revenue that pays for developers to fix all the bugs for all browser clients under the sun.
People love to rant online about how NO you should give me EVERYTHING and do it for FREE but this is childish tantruming and has no relationship to reality. Devs are not an endless resource that just gives and gives forever. They are regular people who need to go home at night like anyone else.
That can’t be fixed. We can’t wait for a different kind of human (what if it’ll be an artificial psychopath anyway) to fix our current thing.
So hard to disrupt means of organizing (for associations, unions and such, unofficial) and building electoral systems (for Internet communities even, why not) are needed ; social media gave people a taste of that to lure them before subverting it all, but the idea is good.
Some sort of a global system. When it’s in place, improvement around will follow.
It can be fixed: we can choose to produce less idiots and more caring people. You are right, of course, that it is not the only thing we should be doing
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.
Yeah, it’s not a hard concept, it is an impossible concept.
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.
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.
Blame the ui frameworks like react for this. It’s normalized a large cross-section of devs not learning anything about how a server works. They’ve essentially grown up with a calculator without ever having to learn long division.
Not all frameworks are bad
The problem is the devs/owners not understanding basic fundamentals. They could see a major financial benefit if they make the page snappy and light but apparently no one at these companies realizes that.
PE from server rendering only to a full interactive SPA in the browser is really not trivial both for frameworks and app devs
there are a handful of frameworks that support it fairly ergonomically now but it’s a discipline that takes time and effort
also disabling javascript is a tiny minority use case
JavaScript is needed to actually build anything useful. It is way easier to maintain and when done properly it can be very fast to load and use.
The problem with today’s web is that pages are extremely inefficient and bloated. You can keep the same UI just don’t try to use every framework and library under the sun. Also it would be nice if people actually formated assets properly instead of using tons of large images and other assets.
JavaScript is needed to actually build anything useful
Tell this to the people who build things you would call today a “Webapp” with CGI written in C.
So many basic pages are still done as an SPA when they’d work fine as a postback form. It’s infuriating, but web development is rife with magic hammers.
JavaScript is needed to actually build anything useful
Not even close. I wrote a management system for the keyfobs at my makerspace. I had some JavaScript in there previously for things like loading up logs with pagination over ajax calls or searching for members by name. I took all that out and made it straight server side HTML. It’s fast, takes minimal browser memory, and the back button works with zero fuss.
Just try making an application that way sometime. Yes, you can find places for targeted use of JavaScript, but every web dev should at least try making a project without it.
It’s not the bulk of your point (of which I agree with) but your mention of the back button reminded me how much I despise – sometimes above everything else – how much these sites override basic functionality of the browser, overriding inbuilt history navigation, screwing up Ctrl click behaviors, stealing my right-click menu or default key bindings.
There’s a lot of reasons one might not want to use TikTok but the reason that stops me before even having to consider other reasons (but I can’t really explain to most people) is that it’s a site designed without any really respect or regard for the user.
Alt+d doesn’t work and Ctrl+l pops up some modal about logging in. I can’t open any of the recommended videos in a new tab because they clearly must’ve just done them as
onclick
s and not real anchor tags so right clicking doesn’t give me the option and neither does Ctrl clicking (which – also – that’s…got to be an accessibility violation, right?). And more than half the time the full page doesn’t even load because it’s such a strangle of resources that it needs me to click a button on the page because it wasn’t able to load the videos listing of an account in time.The whole thing is just a nightmare in terms of design and primarily not even in terms of inefficiency but direct hostility to UX. Absolute garbage.
I’m sure you have something different in mind than me when you say JavaScript is way easier to maintain.
JavaScript is needed to actually build anything useful.
Underage user detected!
If it’s a standard webpage that only displays some static content, then sure.
But everything that needs to be interactive (and I’m talking about actual interactivity here, not just navigation) requires Javascript and it’s really not worth the effort of implementing fallbacks for everything just so you can tell your two users who actually get to appreciate this effort that the site still won’t work because the actual functionallity requires JavaScript.
It all comes down to what the customer is ready to pay for and usually they’re not ready to pay for anything besides core functionallity. Heck, I’m having a hard enough time getting budget for all the legally required accessibility. And sure, some of that no script stuff pays into that as well, but by far not everything.
Stuff like file uploads, validated forms and drag and drop are just not worth the effort of providing them without JS.
The business customer or the visitor?
The visitor doesn’t exactly have a way to give feedback on whether they’d use a static page.
Stuff like file uploads, validated forms and drag and drop are just not worth the effort of providing them without JS.
Honestly many of today’s frameworks allow you to compile the same thing for the Web, for Java for Android, for Java for main desktop OS’es and whatever else.
Maybe if it can’t work like a hypertext page, it shouldn’t be one.
The business customer who actually pays for the development.
Maybe if you can’t use the web without disabling JS, you shouldn’t?
Progressive Web Apps are the best tool for many jobs right now because they run just about everywhere and opposed to every single other technology we’ve had up until now they have the potential to not look like complete shit!
And the whole cross compilation that a lot of these frameworks promise is a comete pipe dream. It works only for the most basic of use cases. PWAs are the first and so far only technology I’ve used that doesn’t come with a ton of extra effort for each supported plattfrom down the line.
The business customer who actually pays for the development.
Then it’s my duty as a responsible customer to not make it profitable for them, as much as I can.
Maybe if you can’t use the web without disabling JS, you shouldn’t?
Suppose I can use the Web with JS disabled. Just that page won’t be part of my Web.
Yes, of course when the optimization work has been done for you, it’s the easiest.
It’s an old discussion about monopolies, monocultures, standards, anti-monopoly regulations, where implicit consent is a thing and where it isn’t, and how to make free market stable.
file uploads and forms are the easiest to do server side
Not if you want them to be at least halfway user friendly. Form validation is terrible when done completely server side, and several input elements like multiselect dropdowns, comboboxes and searchfields won’t work at all unless supported by client side JavaScript. And have you ever tried to do file previews and upload progress bars purly serverside?
So I guess by fileupload you mean “drop file here and wait an uncertain amount of time for the server to handle the file without any feedback whatsoever.” and by forms you mean “enter your data here, then click submit and if we feel charitable we may reward you with a long list of errors you made. Some of which could have been avoided if you knew about them while filling in previous fields”.
It depends on the type of input validation you’re doing, a bunch of it is built into the browser and you don’t need JS for it.
So - the situation is understood, but the question arises, what does this have in common with a global hypertext system for communication.
Maybe all this functionality should be removed into a kind of plugin, similarly to how it was done with Flash and Java applets and other ancient history. Maybe sandboxed, yes.
Maybe the parts of that kind of plugin relating to DOM, to execution, to interfaces should be standardized.
Maybe such a page should look more like a LabView control model or like a Hypercard application, than what there is now.
One huge benefit would be that Google goes out of business.
It depends on what you are doing
To balance it out, I made it so that my web pages fail to load if JavaScript is turned on. Yes, really.
Okay, I guess technically it shows a message that says “Turn off JS, dummy!”, but it’s the same in spirit.
I’m sure your 12 users really appreciate how edgy that is
I don’t have any users, just readers, and all seven of them use cli browsers to read it, lol. If I actually gave a shit about people I see less-than-weekly reading my stuff, I’d obviously not have it set up like I do.
To be clear, this is just one of my websites.
Nothing screams “I have no social life and still live in my moms basement” like using a CLI browser.
Dude, relax. There’s no need to feel threatened by people enjoying themselves.
You just said “shut up nerd” but without it being funny
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.
Most don’t even know
@media (prefers-color-scheme: dark/light)
, rather cobble something with JS that works half of the time and needs buttons to toggle.A button to toggle is good design, but it should just default to your system preferences.
Took me ages to find a snippet that has a manual dark mode toggle but in a way that works with prefer-color-scheme so by default it inherits your settings but you can overwrite it… It’s just not a priority for a lot of people or they’re ok with the site flashing or something.
Bookmarking this, so far I’ve cobbled my Dark/Light Mode switch together with Material-UI themes, but this seems like the cleaner way to do this that I’ve been searching for!
I hate “dark mode” so much
Don’t default to it as it makes the page hard to read and ugly. If you want make it optional that is fine but don’t force it.
I hate “light mode” so much
Don’t default to it as it makes the page as blinding as the mid-day sun. If you want make it optional that is fine but don’t force it.
I hate default text size
Don’t default to it as it’s too small for a lot of people to read. Optional is fine, but don’t force that small text on me by default, making me go into your small text settings to find the large text setting
It’s worse than this even. I have an old Raspberry Pi 3B+ (1G) that I got in 2018. I hooked it up the other day to mess around with it, it’s been maybe 2 years since I did anything with it, ever since I got a Pi 4 (4G). 1 gigabyte of RAM is now insufficient to browse the web. The machine freezes when loading any type of interactive site. Web dev is now frameworks piled on frameworks with zero consideration for overhead and it’s pure shit. Outrageous.
You want to see terrible try looking at the network tab in inspect element
“Modern” pages load hundreds of large assets instead of keeping it smaller and clean.
its also cdn on cdn nobody does local libraries anymore
It’s encouraged to use things with a supply chain easily poisoned.
There’s the issue of a Heisenberg effect here - when a spectator is present, like a huge audit of something, nothing happens, and when a spectator isn’t present, there’s nobody to look every day in piles of constantly changed crap to detect if something happens.
Also not even easily poisoned, but easily denied. It’s about control. The militaries and producers of complex industrial equipment were the first to start doing this, however nuts that may seem. It’s useful to sell your allies a system they can use, but only when allowed. Or sell industrial equipment that can’t be smuggled to a third country without your permission.
These things - they are legal even morally, but at some point in discussion of them common good might arise as a thing in itself, separate from morality. For the common good such systems of control are clear poison.
Graceful degradation - pfft.
Progressive enhancement - yeah!
this is the way
Graceful degradation is for people that are angry about the future. Progressive enhancement is for people that respect the past. And it’s stupid to not hire someone only because they don’t know a term that you know.
Are you lost? I didn’t talk about hiring practices.
I was referring to OP’s post because they mentioned “candidates”. I was also agreeing with your comment regarding progressive enhancement lol
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.
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
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?
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.
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
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.
Low-key I’m disagreeing
I don’t know how you’re gonna get everything to work without JavaScript. You can’t do a lot of interactivity stuff without it.
Do “the stuff” on the server, only serve HTML. In my first job we build a whole webshop with very complex product configurators that would today even run perfectly fine in dillo.
It’s also pleasant for the brain, to think of a website in terms of resources/locations and variables. Only what a GET request needs.
All those complaints - they are in essence about herds of web developers who get paid to do roughly the same work again and again, and use frameworks upon frameworks to not get depressed from that. And complain that if they’d do that stupid work thoroughly, they’d kill themselves.
Gemini protocol taken as it is probably isn’t enough for commercial purposes, but the part about simple markdown-like pages and only determining semantics of style by the page creator, not how it will be displayed, - it’s correct IMHO. Let the user pick the theme or the CSS stylesheet they prefer to display text, like with e-books. Let the service present structure.
(Except I think gemtext not allowing tables is a mistake.)
That also means that all kinds of validation and blinking buttons and such won’t have to be implemented by web developers.
I’ve had news articles not work without javascript. (unpaywalled as well).
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.