I use a script blocker, which blocks all scripts from running by default and allows you to selectively permit those necessary for websites to function correctly. This not only blocks taking software but also conveniently makes some sites work much faster by disabling most of the crap the designers put there, leaving the plain text I actually came to see. Other sites, of course, are designed in such a way that nothing at both all displays without JavaScript running.
What's interesting, though, is looking at the scripts being blocked. A huge proportion of the sites I visit are trying to run trackers from Amazon, Facebook, Google and other companies that I think are third party trackers gathering data for sale to advertisers. Far more than aren't. This is why so much of the internet is 'free'.