• JumpyWombat@lemmy.ml
    link
    fedilink
    arrow-up
    46
    arrow-down
    1
    ·
    2 days ago

    Yes, but it would break many pages and it wouldn’t protect you from many attacks.

    It’s like wearing a gas mask: you can still be hit by a car or bitten by a dog, it ruins your walk in the park, but it makes you immune to some toxins.

  • Multiplexer@discuss.tchncs.de
    link
    fedilink
    arrow-up
    18
    ·
    edit-2
    2 days ago

    Yes, as it basically is just foreign, untrustworthy Code executed on your own PC.
    But total blocking will make most of the web unusable.
    I use a selective Script blocker extension (Noscript), that lets you instead choose which domains are allowed to use Javascript.
    Works great after the initial try-and-error setup phase.

  • JoeKrogan@lemmy.world
    link
    fedilink
    arrow-up
    10
    ·
    2 days ago

    Yes because scripts can execute on page load just by visiting the site. I block by default and only allow as needed on sites.

    • dustycups@aussie.zone
      link
      fedilink
      arrow-up
      9
      ·
      2 days ago

      Noscript ftw. It might break lots of sites on first load but you get to see what other domains get snuck in.

  • Max-P@lemmy.max-p.me
    link
    fedilink
    arrow-up
    9
    ·
    2 days ago

    Yes, a lot safer. Even bugs in the renderer or media player would typically be triggered by JavaScript by say, moving elements around really fast or whatever.

    Without JavaScript, the browser renders that page and that’s it, there’s no JS to modify it or open popups, nothing to dynamically load/refresh content. The most you can do without JS is animations and responding to simple events like changing the color of a button when the mouse is over it. So your only shot to attack this is the renderer during initial page load, once.

  • Scott@sh.itjust.works
    link
    fedilink
    arrow-up
    8
    ·
    2 days ago

    Yes. Most malicious code will be rendered by your browser using JS.

    To simplify this I run two browsers, one for logins and the other for general usage without JS enabled.

    No JS also makes surfing more private as your browser discloses far less information about your computer. Check out any of the browser fingerprinting sites with and without JS running. The details about your computer are far greater with JS enabled.

    Bonus, seldom does a paywall stop me from reading an article. You know those popup that tell you how many free articles you have left this month? Most sites use JS to keep track of that.