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.

  • Possibly linux@lemmy.zip
    link
    fedilink
    English
    arrow-up
    0
    ·
    30 days 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
      0
      ·
      30 days 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
        0
        ·
        30 days 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.

    • Frezik@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      0
      ·
      29 days ago

      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.

      • tomenzgg@midwest.social
        link
        fedilink
        English
        arrow-up
        0
        ·
        29 days ago

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

    • Kissaki@feddit.org
      link
      fedilink
      English
      arrow-up
      0
      ·
      29 days ago

      I’m sure you have something different in mind than me when you say JavaScript is way easier to maintain.

  • MonkderVierte@lemmy.zip
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 month 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
      0
      ·
      30 days 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.

      • shiftymccool@programming.dev
        link
        fedilink
        English
        arrow-up
        0
        ·
        29 days ago

        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.

        • moseschrute@lemmy.world
          link
          fedilink
          English
          arrow-up
          0
          ·
          29 days ago

          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

          • artiman@piefed.social
            link
            fedilink
            English
            arrow-up
            0
            ·
            29 days ago

            I hate default text size

            Don’t default to it as it’s too big for a lot of people to read. Optional is fine, but don’t force that big text on me by default, making me go into your big text settings to find the small text setting

    • python@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      28 days ago

      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!

    • unmagical@lemmy.ml
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 month ago

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

    • JustARaccoon@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      30 days 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.

  • mobotsar@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    1 month ago

    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.

  • cley_faye@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    29 days ago

    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.

    • Scrollone@feddit.it
      link
      fedilink
      English
      arrow-up
      0
      ·
      29 days ago

      It depends. Inertia.js can pre-render pages server side, so you don’t need JavaScript to see the content.

      • cley_faye@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        28 days ago

        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.

  • Phoenixz@lemmy.ca
    link
    fedilink
    English
    arrow-up
    0
    ·
    29 days ago

    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

  • hperrin@lemmy.ca
    link
    fedilink
    English
    arrow-up
    0
    ·
    29 days ago

    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.

  • Sertou@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    29 days ago

    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.

    • katy ✨@piefed.blahaj.zoneOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      29 days ago

      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

  • XM34@feddit.org
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 month 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
        0
        ·
        edit-2
        30 days 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
          0
          ·
          30 days 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.

        • rottingleaf@lemmy.world
          link
          fedilink
          English
          arrow-up
          0
          ·
          29 days ago

          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.

    • rottingleaf@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      29 days ago

      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.

      • XM34@feddit.org
        link
        fedilink
        English
        arrow-up
        0
        ·
        29 days ago

        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.

        • rottingleaf@lemmy.world
          link
          fedilink
          English
          arrow-up
          0
          ·
          29 days ago

          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.

  • Supervisor194@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 month 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
      0
      ·
      30 days 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.

    • rottingleaf@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      29 days ago

      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.

  • swelter_spark@reddthat.com
    link
    fedilink
    English
    arrow-up
    0
    ·
    29 days ago

    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.

    • Croquette@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      0
      ·
      29 days ago

      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.

  • normalexit@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    29 days ago

    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.

  • moseschrute@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    29 days ago

    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.

    • monobot@lemmy.ml
      link
      fedilink
      English
      arrow-up
      0
      ·
      29 days ago

      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?

      • moseschrute@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        29 days ago

        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.

      • cley_faye@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        29 days ago

        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.

      • Infinite@lemmy.zip
        link
        fedilink
        English
        arrow-up
        0
        ·
        29 days ago

        Problem is so many trains are ugly for no good reason.

        And steel is being used to shoot people and stab people aggressively.

    • Cam@scribe.disroot.org
      link
      fedilink
      English
      arrow-up
      0
      ·
      29 days ago

      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.