logoalt Hacker News

goodmythicaltoday at 6:54 PM2 repliesview on HN

I've always wondered about all of the other stuff, though.

I've considered doing the pi-hole thing for family, but doesn't ublock etc do a lot of fixing to make sure pages aren't broken when ads are missing?

Or does pi-hole/your implementation do the same?


Replies

OJFordtoday at 7:08 PM

Yes, uBlock can and does do more than DNS blocking.

Consider the simplest possible case: I run ojford.com and take money from Acme Inc in exchange for displaying their advert. They send me acme-banner.jpg, and I serve it at /static/current-ad.jpg with an <img id="banner-ad" src="/static/current-ad.jpg"> in my header or whatever.

A DNS block covering the ad would block my whole site. Effective, but useless. (Unless you actually intend to boycott anyone who advertises.)

uBlock however can block the #banner-ad element. (Whether community-curated or by you specifying it yourself.)

More realistically this might be say YouTube or googleusercontent subdomains that serve both ads and 'real' content.

show 1 reply
philipovtoday at 7:46 PM

yeah, the useful thing about ublock isn't just that it stops ads from loading, but that it lets you remove unwanted divs. There are lots of unwanted divs that have nothing to do with ads, such as removing annoying Use Our AI buttons, or the Shorts section of youtube.