logoalt Hacker News

Facebook ads are so hard to block that uBlock Origin stopped filtering them

123 pointsby bundietoday at 12:07 PM105 commentsview on HN

Comments

akerstentoday at 12:51 PM

They do this by adding a ton of useless markup and splitting words like "ad" into single-letter spans with random class names and 8-layer deep nests of `<div>` so it's very hard to write selectors against. One has to wonder how that div soup affects accessibility as I find it very unlikely that this content is presented nicely to assistive tools. I hope they get all the ADA suits they deserve for this.

show 7 replies
beej71today at 3:08 PM

I haven't used fb for years, but yesterday I was considering going there to only repost anti-meta news stories to try to get as many of my followers to quit as possible.

But I'm not convinced it will have an effect. And I'd have to use fb.

drnick1today at 12:48 PM

Blacklisting facebook.com at the DNS level has worked pretty well for me.

show 2 replies
whywhywhywhytoday at 1:38 PM

The approach they should have taken is to start whitelisting the components that are not ads.

Think of how the structure of Meta is gonna work, there's some team in charge of ads who has a sub team now in charge of messing with the ads to stop them being blocked.

If you start whitelisting everything that isn't an ad you move the problem into an area the team in charge of blocking the ads don't have control over.

Highly unlikely the team in charge of stopping ad blocking has swing to then start changing the code of every other element on the page to break your non-ad white listing.

show 4 replies
pavel_lishintoday at 1:32 PM

I've tried to write a tampermonkey script to at least block the Reels, but even that's hella difficult.

The solution is truly to just never be on Facebook, but - our local PTA only distributes news via Facebook. (There may be a Whatsapp group I don't know about, which isn't better.) So does the local library. If the township publishes things elsewhere, I don't know about it.

I use a service to convert some pages' feeds to RSS, which is semi-reliable, but doesn't work well and is a paid service if you want more than two feeds - I wish I could hand-roll something myself.

The-Old-Hackertoday at 12:40 PM

I use a browser extension called F.B. Purity. It's worked across multiple browsers for years.

https://www.fbpurity.com/

show 3 replies
VCFundedGenYertoday at 1:27 PM

Facebook is trying so hard to defeat adblockers that the actual website is borderilne unusable. I have found in the past year or so that pages just get hung on "loading" transitional screens way more often, even in normal circumstances.

They need to surrender this whole anti-adblocker crusade because it will kill them in the long run (along with the billion other problems FB has)

show 2 replies
greenleafone7today at 1:22 PM

Best solution is to never use any of those useless apps ever again.

jcfreitoday at 12:33 PM

Once LLMs get fast enough at processing real-time images Apple (or anybody really) can just roll out a browser rendering engine that just masks all ads. It will take a few years but the browser ad-business is in it's terminal phase.

show 8 replies
nelsonictoday at 1:31 PM

Very simple: just block all Meta domains at your local DNS. Nobody needs Meta. And if there is something you desperately need to see on one of their platforms temporarily switch your DNS.

baggachipztoday at 12:47 PM

Oh the irony: https://ibb.co/NnxGJyr1

show 1 reply
lucrbvitoday at 1:09 PM

It would be fun to train a small vision neural network to recognize ads instead of relying on HTML or network requests. I don't know if anyone has done this yet.

nticompasstoday at 12:47 PM

Man, am I happy that I deleted my Facebook. No regrets.

OroPlatoday at 1:36 PM

I have to admit that I never got to visit facebook in all my life, since my browser add-ons made it so the site would never properly load. I'm not sure whether I've been missing out or dodging a bullet.

show 1 reply
molticrystaltoday at 1:48 PM

If anybody want to take a crack at fixing and maintaining the issue, while the team has been worn out to the treads, they are still open to pull requests [0], here is the statement that is alluded to in the article:

>paintboth1234 uBO Team wrote:

>The project is FOSS. Anyone else who wants to deal with this disgusting site is free to make pull requests with working solutions themselves.

[0] https://www.reddit.com/r/uBlockOrigin/comments/1vgcjg5/about...

Marsymarstoday at 1:34 PM

The immediate fix to this is regulatory action.

Facebook has made itself indispensable in a number of areas that are in the public interest and should be treated as a public good for these purposes.

Ads are pollution, and Facebook is forcing people to choose between ingesting pollution and using facebook marketplace, or throwing their used but functional goods in the garbage.

show 2 replies
hollow-moetoday at 1:26 PM

This doesn't set a good precedent unfortunately... Hello to that Google guy that just got tasked to do the same with Youtube.

show 1 reply
maxwellitotoday at 2:15 PM

Hot take: uBlock origin could insert even MORE ads into Facebook? Discouraging people to use Facebook, and also make some money on the side.

(this is a joke obviously, but boy that would be fun and against the T&C)

show 1 reply
red_admiraltoday at 1:31 PM

My setup: separate profile for Facebook. Targeted advertising turned off. FB domains blocked on main profile.

Not perfect, but it works.

gregorioltoday at 1:25 PM

So basically Facebook ads won and we are doomed

show 2 replies
XorNottoday at 1:01 PM

My solution to this was just to stop using Facebook.

Though evidently someone's cut a deal because Facebook groups is all over Google search results these days.

show 1 reply
cptajtoday at 1:57 PM

I'm not saying this is a rallying call to help but...

nepthartoday at 2:12 PM

This is a perfect use case for AI, no?

surgical_firetoday at 2:42 PM

The best way to do this is block Facebook entirely.

partloyaldemontoday at 1:35 PM

I use the “natural” method for blocking Facebook ads.

classifiedtoday at 2:15 PM

This barf bag of a company is making the internet a war zone. If at all possible, the best you can do is to never touch their toxic mess.

amazingamazingtoday at 1:10 PM

Assuming you insist on using facebook you can proxy it, using a simple script that removes all ads prior to serving. The problem of course is that this is not cheap. Easier to just not use facebook.

show 1 reply
j45today at 2:04 PM

Blocking ads sounds like a job for AI

ImHereToVotetoday at 12:46 PM

I don't understand why websites don't just take ownership of ads. Then it will be impossible to block them.

show 4 replies
drcongotoday at 12:38 PM

It's easy, just block every Facebook owned domain there is. Works for me.

show 1 reply
tamimiotoday at 2:08 PM

I mean the ultimate solution is block fecebook entirely and any and all its other companies/domains, but I think the best approach is not to block ads, but to block everything and only let the text and other useable html code out, that can’t be countered as your filter is not going after specific match they try to hide behind some long tags, rather than blocking all and just pass the readable useful buttons.

throwyoniontoday at 12:32 PM

[dead]