Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Couldn't you go a step further and have the extension look for "sponsored" list items and simply remove them from the html?


Ad blockers such as uBlock Origin try. IIRC, Facebook obscures the HTML in a way that makes blocking without a more advanced parser harder.


Facebook sponsored posts and Twitch ads are the only ones that get away with it that I've came across - and noticed at least. When you inspect FB sponsored posts' HTML they're very obscured indeed, there's sure no instance of "Sponsored" anywhere in the page's HTML. I haven't really tried but there doesn't seem to be any well rated "FB ad blocker" extension either, whereas you can block Twitch ads easily with a number of extensions. OTOH I've never understood how it can be so rare, even Google's cash cows are [killed by UBO](https://imgur.com/a/fKJDKk2) from their own own store. To get away with it on mobile they had to gut all mobile extensions, somehow without losing their kingly market share. Funnily enough, even if FB are pretty much the only ones getting away from basic browser adblockers AFAIK, that segment is barely material for $FB as they get like 94% of their revenue from mobile anyhow (presumably quasi-all from the native apps).

If someone knows why obscuring HTML to force ads isn't more common practice, I'd be curious to know. I get it maybe for small websites that need the organic traffic (I assume Google would hit your SEO if your page structure looks like FB's), but how can it be so hard when it is indeed possible? I could understand if Google more specifically doesn't even try as they may lose adblocking nerds and they could use the data anyway, but I would expect to come across more sites that found solutions or clever ways of serving ads around UBO/ABP, at least make me use the picker. Is it really a colossal job to obscure ads and if it is reachable wouldn't medium-sized websites that find implementations remain unpatched for quite a while (big world out there)? Do you really need to own >$100B/Y business on godly margins or AWS to afford a fighting chance at that arm's race?


> If someone knows why obscuring HTML to force ads isn't more common practice, I'd be curious to know.

Three basic reasons:

1. For websites that aren't as large as Facebook, most advertisers insist on running their own code on the page to do things like count impressions (to make sure the owner of the site can't lie about how many views the ads got). This is easily blockable.

2. It's not profitable for most websites to engage in an arms race with ad blockers. Your web developers' time is almost certainly better spent on trying to grow the userbase, not showing ads to a subset of users who will almost certainly not click on them. (And businesses will often make decisions based on data from third-party trackers that are also blocked by ad blockers, so it's possible the relevant department does not even know those users exist.)

3. There is already a very difficult-to-block form of advertisement available to many websites: sponsored content. Just bake the advertisement directly into the video, or as a paragraph of a long blog post with no distinguishing CSS, or something.


Also as a developer, I feel its my duty to be a good steward towards people that want to block ads or use classes that will block social media icons using classes from those lists and still look appealing. The client likely doesn't know and neither do the majority of users that haven't enabled such features, but respecting the wishes of those that do I think is the right thing to do. It's in the same class as respecting Save-Data: On or or DNT: 1.


Thanks for sharing.


F.B. Purity does just that, but the HTML is fairly complicated (if I remember correctly, the relevant words are a jumble of absolutely positioned spans, with a lot of fodder thrown in to throw off blockers). Facebook changed their code about a month ago, and the extension developer has been working on a fix for almost all of that time and still hasn't rolled it out yet.


It's obfuscated to make it difficult to ad-block.


It's a cat and mouse game. See an example of how Facebook obfuscates "Sponsored" here:

https://www.reddit.com/r/assholedesign/comments/anila7/faceb...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: