The web is full of garbage. This is how I avoid some of it.

The modern web is full of trash. Useless Javascript, annoying tracking cookies, modal pop-overs, interstitial ads, autoplaying videos - in many cases, it’s just garbage that adds nothing to the experience, burning both computational and cognitive cycles for no benefit to the user. I’m sure some web designers love to feel clever, and making all of this trash surely must be a lot of fun for them, but the more clever they become the worse sites seem to actually behave.

All of this junk is often a distraction from the actual content I want. In most cases, I just want the text. I don’t want garbage.

I will describe how I browse the web below. By doing the things I mention here, my browsing experience is radically altered. Sites no longer work as their very clever designers intended. In a lot of cases, I just get text — which is also, in a lot of cases, the only thing I actually want.

I use two browsers

For most things, I use Firefox. I mainly do this because the mission of the Mozilla Corporation is, on paper at least, aligned with its users. They’ve betrayed this trust in the past, with things like Pocket integration and modifying the user’s default search engine when upgrading, but most of the time they get things mostly right. Importantly, Mozilla’s business model doesn’t depend on collecting data from users so they can more effectively sell advertising.

I do also use Chromium (the unbranded, built from source companion to Google Chrome), but only for Google’s own services. I’m wary of Chromium, because Google is an advertising purveyor. The interests of Google are not aligned with those of Chrome users, since users are the product that Google sells to their actual paying customers, the advertisers. As a practical reality, this doesn’t necessarily mean that Chromium will be hostile to user interests — the team developing Chromium may have sufficient autonomy to fight on behalf of users at any given time. This conflict of interests, though, means that at best Chromium is in a precarious position where it relies upon the benevolence of key individuals in the google org chart to prevent it from becoming yet another way to extract data from users.

By using Chromium for google services, I don’t need to ever sign into my Google account in my “primary” browser, Firefox. I do all of my searching in Firefox, and by not being signed in I am not impacted by the Google “bubble,” where search results become skewed by what Google thinks I’m interested in and what it thinks I like.

I don’t keep cookies

A lot of web sites use cookies. You might have the impression that you need cookies. In some cases, you do.

The Big Secret about cookies is that even when you need them, you almost never need them for very long. Sites use cookies to keep track of who you are between requests, which you sometimes actually need them to do, but usually on the order of hours — not years, as is common with news sites like CNN.

You need cookies when a site really does need to know who to you are in order to function — basically, any time you need to “log in,” and any time you need to do complex interactions with a site involving user inputs across multiple pages.

But if you’re just reading a web site anonymously, or doing a web search, is there any benefit in having the site owner track you? That’s a rhetorical question — there’s not.

Ideally, it would be great to completely disable cookies and re-enable them only as needed. Although possible, this is really cumbersome, because a lot of sites that don’t really need cookies for their core functionality simply refuse to work if you don’t allow them to set cookies, since they love to get your juicy data.

So how do you not keep cookies?

I expire cookies upon browser session quit. This way, web sites function properly, but as soon as I quit my browser and start anew all of my cookies are gone.

Firefox: hamburger -> preferences -> privacy -> history -> firefox will [use custom settings for history] -> accept cookies from sites [checked] -> Keep Until [I close Firefox]

Chrom(e|ium): hamburger -> settings -> show advanced settings (allll the way at the bottom) -> content settings -> Cookies -> [o] Keep local data only until you quit your browser

What does this break?

From a certain perspective, this won’t actually break anything — all sites will function completely fine with this setting.

The “issue” is that now, every time you restart your browser, you’ll need to “log in” to the sites you actually want tracking you.

How do I unbreak it?

Easy: just log in again. If that’s too cumbersome, you can add exceptions for sites you visit frequently. Like so:

Firefox: hamburger -> preferences -> privacy -> history -> firefox will [use custom settings for history] -> accept cookies from sites [checked] -> Exceptions…

Chrom(e|ium): hamburger -> settings -> show advanced settings (allll the way at the bottom) -> content settings -> Cookies -> Manage exceptions…

I block third party cookies

Third party cookies are garbage. Unlike cookies generally, there is no legitimate need for third party cookies and you never want them. If you have third party cookies enabled, sites you don’t even visit directly will track your browsing patterns, since they will set cookies via content included at other sites (the linked article above uses the Facebook “like” button as an example). This technique is commonly used by advertisers and by businesses who sell customers to advertisers (such as social networks) to develop robust profiles of user behaviours to more effectively monetize their data.

How do you block them?

Firefox: hamburger -> preferences -> privacy -> history -> firefox will [use custom settings for history] -> accept third party cookies -> never

Chrom(e|ium): hamburger -> settings -> show advanced settings (allll the way at the bottom) -> content settings -> block third-party cookies and site data

What does this break?

Quite possibly, absolutely nothing.

Some very old and/or poorly designed ecommerce sites and financial institutions do still use third party cookies when bouncing you around across different domains. This is uncommon, but it can be a major headache when it happens.

How do I unbreak it?

For such sites, you can use Chrome in incognito mode, then click on the little “fortune cookie with an x” icon that will appear to the right of the URL bar on the broken site. From here, you can add a cookie exception for the sites you are dealing with. Or, as above:

Firefox: hamburger -> preferences -> privacy -> history -> firefox will [use custom settings for history] -> accept cookies from sites [checked] -> Exceptions…

Chrom(e|ium): hamburger -> settings -> show advanced settings (allll the way at the bottom) -> content settings -> Cookies -> Manage exceptions…

I use uBlock Origin

uBlock Origin goes a long way to fixing what’s wrong with the web.

It’s “just” an ad blocker. But it’s very efficient, and it has a deceptively powerful mode buried within it (more on that later). You can replace Adblock Plus with uBlock origin.

How do I get it?

There’s an official add-on for Chrome and for Firefox. (NB: it also works on Firefox Mobile for Android).

Just install it, and off you go.

What does it break?

It will break ads. If you like ads, then this may be a problem.

Some sites do malfunction in subtle ways with uBlock origin’s default blocklists enabled. This isn’t common, but it will eventually happen.

How do I unbreak it?

In the simplest case, you can just click the huge “Power” button in the uBlock Origin menu. This will disable the add-on on the current domain.

This is kind of a bummer though, because you then still get ads and the tracking and all of the garbage to go with it.

If you’re going to allow a site to bypass uBlock origin, you might want to run it a “Private Browsing” tab.

I block third party everything [ADVANCED!]

Everybody should block third party cookies, because there’s just no good reason for a user to want them. Garbage. Block it.

Everybody should also block ads, because they’re also trash. They waste your time and get in your way. They slow down your browser and hurt usability. Just block that garbage.

For “third party content” more generally — that is, stuff on a page served from a domain other than the one in the URL bar at the top — it’s less clear exactly how far to go down this blocking rabbit hole. There are legitimate use cases for third party content, and a lot of the web relies upon it.

Blocking all third party content means you can only load resources hosted on the domain you are accessing. No third party JS. No third party images. No third party nothing. This means nobody else can track you or throw garbage at you, except for the stuff that’s hosted by that domain in your URL bar (well, nobody else can track you using cookies and tracking URLs pointing to other sites, anyway — nevermind government actors, corporate or ISP meddling, etc).

But if you do this, the web will be very different for you. Better? Maybe.

How do I do it?

For this trick, you again need uBlock Origin. Install the add-on. Then you need to read and fully comprehend this document.

What breaks?

Almost everything.

Seriously, almost everything will break. Very few sites from the last decade are designed to function without any third party content.

How do I unbreak it?

The fundamental idea here is that you have to either be willing to spend some time making web sites work, or you must accept that some web sites will be broken. In its powerful “default deny” mode, uBlock origin will block a vast majority of web content, and you will need to use the uBlock Origin UI to selectively unblock the content you actually want to see.

Unfortunately, there’s no simple rule for fixing sites. In many cases their brokenness doesn’t actually matter, because the only thing broken is the garbage you didn’t actually want to begin with. For example, many sites simply degrade to text, which is often exactly what you want.

Here’s a trick: when dealing with a site that has degraded to only text, try using Firefox’s “Reader” mode (the book icon to the right of the URL bar). This will tidy things up and make them much more legible. This is especially important if alignment, sizing, and spacing are really wonky.

If you need to unblock stuff, you need to use the uBlock Origin menu. Guess which domains are relevant and click the middle of the right-hand box to make them “grey.” Try again. Maybe it will work.

Once you find a set of rules that you like, click that little “lock” icon to make the rule persist.

If that’s too much effort, I open the page in a firefox “private browsing” window. There, I tick the middle of the right-hand box beside “third party” so only uBlock Origin’s default rules (which only blocks blacklisted trackers and ads) are in place. This usually does the trick.

Conclusion

The web is full of garbage. It’s terrible. If you block some of it, perhaps you’ll enjoy the web a bit more.

But note, avoiding trash appears to require quite a lot of dedication. Some designers and advertisers are eager to throw a constant, ever escalating stream of sewage at you, trying to distract you from the content you actually want to see with “clever” design that buries content under more and more intrusive interruptions. These are your enemies. Despite powerful tools to assist users, this fight will never be won; the best you can hope is to keep them at bay.

Although you may find the outcome of browsing without garbage rewarding, you should know that this endeavour is not for the faint of heart.

Good luck.