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.

  • NigelFrobisher@aussie.zone
    link
    fedilink
    English
    arrow-up
    1
    ·
    8 minutes ago

    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.

  • Possibly linux@lemmy.zip
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    1
    ·
    6 hours ago

    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.

    • the_wiz@feddit.org
      link
      fedilink
      English
      arrow-up
      4
      arrow-down
      2
      ·
      4 hours ago

      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.

      • NigelFrobisher@aussie.zone
        link
        fedilink
        English
        arrow-up
        1
        ·
        6 minutes ago

        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.

  • scarabic@lemmy.world
    link
    fedilink
    English
    arrow-up
    27
    arrow-down
    1
    ·
    edit-2
    10 hours ago

    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.

  • Supervisor194@lemmy.world
    link
    fedilink
    English
    arrow-up
    21
    ·
    14 hours ago

    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.

    • Possibly linux@lemmy.zip
      link
      fedilink
      English
      arrow-up
      6
      ·
      6 hours ago

      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.

  • XM34@feddit.org
    link
    fedilink
    English
    arrow-up
    33
    arrow-down
    3
    ·
    15 hours ago

    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.

      • XM34@feddit.org
        link
        fedilink
        English
        arrow-up
        9
        arrow-down
        2
        ·
        edit-2
        10 hours ago

        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”.

        • The_Decryptor@aussie.zone
          link
          fedilink
          English
          arrow-up
          2
          ·
          5 hours ago

          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.

    • the_wiz@feddit.org
      link
      fedilink
      English
      arrow-up
      4
      ·
      4 hours ago

      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.

  • MonkderVierte@lemmy.zip
    link
    fedilink
    English
    arrow-up
    35
    ·
    17 hours ago

    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.

    • Possibly linux@lemmy.zip
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      6 hours ago

      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.

    • JustARaccoon@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      7 hours ago

      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.

    • unmagical@lemmy.ml
      link
      fedilink
      English
      arrow-up
      26
      ·
      edit-2
      16 hours ago

      A button to toggle is good design, but it should just default to your system preferences.

  • baggachipz@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    44
    arrow-down
    2
    ·
    19 hours ago

    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.

    • jimmy90@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      27 minutes ago

      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

    • Possibly linux@lemmy.zip
      link
      fedilink
      English
      arrow-up
      3
      ·
      5 hours ago

      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.

  • Armand1@lemmy.world
    link
    fedilink
    English
    arrow-up
    25
    ·
    edit-2
    18 hours ago

    I wrote my CV site in React and Next.js configured for SSG (Static Site Generation) which means that the whole site loads perfectly without JavaScript, but if you do have JS enabled you’ll get a theme switching and print button.

    That said, requiring JS makes sense on some sites, namely those that act more like web apps that let you do stuff (like WhatsApp or Photopea). Not for articles, blogs etc. though.

    • Azzu@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      4
      ·
      edit-2
      16 hours ago

      requiring JS makes sense on some sites, namely those that act more like web apps that let you do stuff (like WhatsApp

      I mean yes, but Whatsapp is a bad example. It could easily use no JavaScript. In the end it’s the same as Lemmy or any other forum. You could post a message, get a new page with the message. Switching chats is loading a new page. Of course JavaScript enhances the experience, makes it more fluid, etc, but messengers could work perfectly fine without JavaScript.

      • PeriodicallyPedantic@lemmy.ca
        link
        fedilink
        English
        arrow-up
        10
        ·
        16 hours ago

        Maybe I’m out of the loop because I do mostly backend, but how do you update the chat window when new chats come in, without JavaScript?

        • Azzu@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          2
          arrow-down
          2
          ·
          14 hours ago

          You don’t, I’m saying it would still mostly work. Getting messages as they arrive is nice but not necessary. For example, I personally have all notifications off, and I only see messages when I specifically look for them, no one can reach me instantly. Everyone seems to be missing that we’re talking about degradation here, it degrades, it gets worse with JS disabled. But it shouldn’t straight up not work.

          A good example for something that does not work without JS would have been a drawing application like they said, or games, there are plenty of things that literally do not work without JS, but messaging is not one of them. Instant messaging would be of course.

          • XM34@feddit.org
            link
            fedilink
            English
            arrow-up
            3
            arrow-down
            1
            ·
            10 hours ago

            Did you just propose degrading instant messengers back into email? 😂

            How exactly do you propose people actually chat with such a system? Continuously hammering F5 while being actively engaged with another person? 😂

          • PeriodicallyPedantic@lemmy.ca
            link
            fedilink
            English
            arrow-up
            3
            arrow-down
            1
            ·
            12 hours ago

            I also feel like everyone seems to be missing that we’re taking about degradation, which isn’t usually “no js at all”, it’s some subset that isn’t supported. People use feature detection to find out of some feature is supported in the browser and if it’s not the they don’t enable the feature the depends on it.

            For the chat example, you could argue that a chat can degrade into a bulletin board, but I’d argue that people use chat for realtime messaging so js is needed for the base use case.

            If your webpage primarily just displays static information, then I agree that it should work without js or css. Like Wikipedia, or a blog, or news, or a product marketing page, or a forum/BBS.
            But there is a huge part of the web that this simply doesn’t apply to, and it’s not realistic to have them put in huge effort to support what can only be a broken experience for a fraction of a percent of users.

        • Vigge93@lemmy.world
          link
          fedilink
          English
          arrow-up
          6
          arrow-down
          1
          ·
          edit-2
          16 hours ago

          You don’t. That’s the gracefull degradation part. You can still read your chat history and send new messages, but receiving messages as they come requires page reload or enabling js.

          • Pika@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            2
            ·
            edit-2
            14 hours ago

            my only issue with this ideology(the require page load) is, this setup would essentially require a whole new processing system to handle, as instead of it being sent via events, it would need to be rendered and sent server side. This also forces the server to load everything at once instead of dynamically like how it currently does, which will increase strain/load on the server node that is displaying the web page, while also removing the potential of service isolation between the parts of the web page meaning if one component goes down(such as chat history), the entire page handler goes down, while also decreasing page response and load times. That’s the downside of those old legacy style pages. They are a pain in the ass to maintain, run slower and don’t have much fallover ability.

            It’s basically asking the provider to spend more to: make the service slower, remove features from the site (both information and functionality wise) and have a more complex setup when scaling, to increase compatibility for a minor portion of the current machines and users out there.

            this is of course also ignoring the increase request load as you are now having to resend entire webpages to get data instead of just messages/updates too.

            • Azzu@lemmy.dbzer0.com
              link
              fedilink
              English
              arrow-up
              3
              arrow-down
              1
              ·
              14 hours ago

              The web interface can already be reloaded at any time and has to do all of this. You seem to be missing we’re talking about degradation here, remember the definition of the word, it means it isn’t as good as when JS is enabled. The point is it should still work somehow.

              • Pika@sh.itjust.works
                link
                fedilink
                English
                arrow-up
                3
                ·
                edit-2
                13 hours ago

                Just to make sure we are on the same page then, cause I don’t see the issue with my post.

                I am using the term “Graceful Degradation” which is meant as a fault tolerance for tech stacks to allow for a critical component to be removed.

                This critical component people are talking about is Javascript which is used for all dynamically loaded content, and used for fallover protection so one service going down doesn’t make it so the entire page goes down (also an example of fault tolerance).

                The proposed solution given would remove that fault tolerance for the reasons I provided in the original reply, while degrading the users experience due to increased page load time (users reloading the page inconsistently vs consistently to get new information) and increasing maintenance costs and overhead on the provider.

                Additionally, the new processing system that you mentioned already exists generally doesn’t, because they(websites) mostly use a dynamic load style nowadays, not a static(as in the client doesn’t change it) page, which is what this type of system would require.

                note: edits were for phrasing, and a typo

  • ExtremeDullard@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    20
    arrow-down
    2
    ·
    19 hours ago

    Funny, from my standpoint, more functional JavaScript almost always feels like service degradation - as in, the more I block, the better and the faster the website runs.

    • Pika@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      14 hours ago

      personally I think this is mostly due to for some reason people tend to give up on visiting a website if it takes more than a second or two to load(guilty as charged though), so instead they load a mostly blank page (which gives the sign that its loading) and then use javascript to load the rest of the content in.

      that and fucking ads galore

      • ExtremeDullard@lemmy.sdf.org
        link
        fedilink
        English
        arrow-up
        4
        arrow-down
        1
        ·
        edit-2
        12 hours ago

        that and fucking ads galore

        And trackers.

        And Javascript that give you the time in the page, as if you didn’t have a clock on your desktop.
        And Javascript that give you a fake chat window to talk to a shitty AI nobody wants in the bottom-right corner.
        And Javascript to annoy you with GDPR shit everybody absent-mindedly clicks away anyway.
        And Javascript to inform you that the site uses cookies, as if it mattered since it won’t work without cookies.
        And Javascript that nags you for a subscription or stops you scrolling to force you to create an account.

        And of course, all that is done by loading megabytes and megabytes of shit recursively from a kajillion nested addresses because web “developers” couldn’t code tight code if their lives depended on it. All they do is import pre-chewed shit that acts as trojans for big data players to plant more trackers and more ads in your browser, just to serve up barf people by and large don’t give a shit about.

  • Korne127@lemmy.world
    link
    fedilink
    English
    arrow-up
    19
    arrow-down
    6
    ·
    19 hours 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.

    • adarza@lemmy.ca
      link
      fedilink
      English
      arrow-up
      11
      ·
      18 hours ago

      website wouldn’t need to embed any JS code.

      other than the 20 trackers and ad scripts.

    • katy ✨@piefed.blahaj.zoneOP
      link
      fedilink
      English
      arrow-up
      15
      arrow-down
      3
      ·
      18 hours ago

      many websites rely on JavaScript,

      which is the problem that most people don’t understand the concept of graceful degradation

    • Azzu@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      5
      ·
      16 hours 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.

      • Possibly linux@lemmy.zip
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        1
        ·
        6 hours 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.

      • Kazumara@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        5
        arrow-down
        1
        ·
        13 hours 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.

    • Björn Tantau@swg-empire.de
      link
      fedilink
      English
      arrow-up
      10
      arrow-down
      2
      ·
      18 hours ago

      Most websites out there could work fine without JavaScript. They rely on it because they can’t be bothered to be better.

      • Possibly linux@lemmy.zip
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        3
        ·
        edit-2
        5 hours 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 browsers. What could be a little JavaScript turns into a ton of write only CSS.

        • Björn Tantau@swg-empire.de
          link
          fedilink
          English
          arrow-up
          1
          ·
          2 hours 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.

    • MonkderVierte@lemmy.zip
      link
      fedilink
      English
      arrow-up
      6
      arrow-down
      4
      ·
      edit-2
      17 hours 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 usecase should still work, even if the secondary or tertiary doesn’t.

      • Korne127@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        14 hours 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.

  • tal@lemmy.today
    link
    fedilink
    English
    arrow-up
    9
    ·
    18 hours ago

    Not even possible to reply to this post using the Lemmy Web UI without having Javascript enabled; the reply button doesn’t function without Javascript.

  • Lena@gregtech.eu
    link
    fedilink
    English
    arrow-up
    13
    arrow-down
    2
    ·
    19 hours ago

    Fair, some websites do need JavaScript though. Such as webapps. Could they be server-side rendered?

    • candyman337@lemmy.world
      link
      fedilink
      English
      arrow-up
      10
      arrow-down
      2
      ·
      19 hours ago

      Depending on the web app, the real solution would be a much more simplified JavaScript free version

      • Possibly linux@lemmy.zip
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        1
        ·
        5 hours ago

        Why spend time and money on something that will end up being only half functional. It costs money to support that.

    • 6nk06@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      6
      arrow-down
      5
      ·
      19 hours ago

      SSR is a thing and could be used to render most content remotely without pissing off readers.

      • PeriodicallyPedantic@lemmy.ca
        link
        fedilink
        English
        arrow-up
        4
        ·
        15 hours ago

        They know ssr is a thing which is why they used that term. But ssr produces a static page or static component, where webapps often require some level of interactivity for their basic functionality, such as reacting to server events. They’re asking if that can be achieved with ssr