clutter primary

How to block the Web's worst clutter

Reader Andrew Locke has no lack of bad luck with unwanted Web content to look at. He'd like to lock out some of it. He writes:

Over the years I’ve found that webpages get more junked up with pop-up ads, pop-over windows, and redirects to pages I don’t want to see. Is there some way to keep this stuff from happening?

As someone who makes a goodly portion of his living from Web-based advertising, I’ll put in a plug for sites that do this kind of thing: Ads and your clicks are what keep many of these companies in business. In lieu of visits from nattily attired executives rattling a tin cup and shouting “Give us money if you want to look at our pages!” ads become the de facto price for viewing online content.

That said, as someone who spends a lot of time browsing the Web, I agree that at some point enough is enough. If I can’t see what I came to read for all the ad clutter, I’m either going to take my eyeballs elsewhere or find a way to block the most obnoxious items.

As I outlined in “How to block auto-play videos,” installing a Flash blocker and shutting off audio and video that play unbidden are pretty easy to do. But a tool like that won’t block other kinds of effluvia—redirects to ad pages or little drawers that jump out at you from the edges of your browser window.

These elements are created using JavaScript, and regrettably JavaScript within a browser is generally an on/off affair. For example, within Safari you can choose Preferences > Security and then disable the Enable JavaScript option. Similarly, on iOS devices you can go to Settings > Safari > Advanced and toggle off the JavaScript switch. When you do this, however, JavaScript is dead for every site you visit. Yes, switching it off disables a site’s distracting elements, but it also disables a lot of its useful ones—commenting systems, videos you do want to see, and pretty much everything that makes rich media so rich.

Given that trade-off, within Safari I tend to click the Reader button that appears next to the Address field when a site is particularly intrusive. Doing so presents you with a page stripped of everything but the story and the images it contains.

googleblockjavascript

Google Chrome lets you block JavaScript on a site-by-site basis.

But Safari isn’t your only browser choice. Google Chrome happens to have a feature that you might like. Within Chrome, choose Preferences and then click Settings. Within the Settings window, click the Show Advanced Settings link. In the Privacy area that appears below that, click the Content Settings button. In the resulting Content Settings window, click the Manage Exceptions button that appears in the JavaScript area. In that window, type the name of a site into the Hostname Pattern field, in this form: [*.]example.com. This ensures that no page within that site can use JavaScript. (For finer control leave out the [*.] and specify particular pages such as popupad.example.com.) From the pop-up menu to the right, select Block. JavaScript is now dead for that site but will work elsewhere.

Subscribe to the Macworld Daily Newsletter

Comments