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.

  • python@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    5 months ago

    I only figured this out like, a month ago! I only became a frontend dev when I got shifted into a new team at work, so I came in with zero prior knowledge and have been using exclusively React and Typescript since Day 1. Didn’t even know how to add a css class to something or what tags beside <div> html has until I started a personal project, ran into performance issues (while hosting it in a shitty aws free tier micro t2 lol) and started investigating why my code loads 3MB of Javascript every time I refresh the page.

    I’m working on getting better at it in my personal project, might even try kicking React out entirely and seeing whether just Laravel Blade + Livewire already does everything I need. No way that I’m rocking the boat at work tho.

  • normalexit@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    5 months 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
    ·
    5 months 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
      ·
      5 months 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?

  • cley_faye@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    5 months 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.

  • Sertou@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    5 months 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
      ·
      5 months 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

  • kieron115@startrek.website
    link
    fedilink
    English
    arrow-up
    0
    ·
    5 months ago

    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.

    • rumba@lemmy.zip
      link
      fedilink
      English
      arrow-up
      0
      ·
      5 months ago

      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

  • Borger@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    0
    ·
    5 months 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

    Not agreeing or disagreeing, but why?

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

      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.

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

        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.

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

    • Frezik@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      0
      ·
      5 months 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
        ·
        5 months 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.