6 ms·
“Install one of the dozens of content blockers that work across macOS and iOS” seems like a better answer than “install a different browser”.
by stephenr 6y ago
“Install one of the dozens of content blockers that work across macOS and iOS” seems like a better answer than “install a different browser”.
- danShumway 6y agoNone of those content blockers work as well as uBlock Origin. Maybe they work well enough for you, and that's fine. But if somebody asks me what the current state of adblocking is and how they can get it, I'm not going to pretend that Safari offers it.
- stephenr 6y agoThanks so much for going into detail and not just “mine is bettererer” like so many do..... Oh wait.
- ribosometronome 6y agoFor the lay user, what's wrong with AdGuard's free edition?
- ADent 6y agoI was getting several sites not working properly with AdGuard. Yeah you can add whitelists and such, but it’s annoying. Some of was it Safari not working. In the end I just use a browser with built in blocking (AdBlockBrowser or now Brave) and leave Safari alone.
- danShumway 6y agoI haven't looked at AdGuard in specific, but fundamentally, AdGuard's Safari version can't be better than uBlock Origin on Firefox/Chrome, because Safari lacks the APIs to do what uBlock Origin does. The immediate problem is that Safari has a hard limit of 50,000 rules per extension. Some developers do try to get around this with various hacky strategies like splitting their adblocker up into multiple extensions, or moving their blocker to the OS-level, or trying to recompile the list on the fly. But at the end of the day it's just a really weird hoop to jump through, and it ends up being kind of error-prone, and there's no guarantee that Apple won't break those hacks in the future. More fundamental is the list itself -- Safari doesn't allow contextual, dynamic blocking, you have to put everything into a static list. This makes it impossible to build the kind of detailed filters[0][1] that uBlock Origin allows -- for example, there's no way to strip HTML content from a GET request in Safari before it gets parsed by the browser. And so on. See the privacy API[2], dns[3], which is used to block a newer bypass method where 3rd-party trackers are hidden behind 1st-party subdomains. Worse CSS/JS injection, etc... I'm not saying everyone else is crap at adblockers, I'm saying static blocklists are fundamentally less powerful and less capable than Firefox's APIs. That's especially true if AdGuard is doing something like system-wide DNS blocking. No shade at those tools, they have a place, but a browser-based extension will always be better than a setup like PiHole, because the browser has more access to a given request's current context. [0]: https://github.com/gorhill/uBlock/wiki/Static-filter-syntax https://github.com/gorhill/uBlock/wiki/Static-filter-syntax [1]: https://github.com/gorhill/uBlock/wiki/Dynamic-filtering https://github.com/gorhill/uBlock/wiki/Dynamic-filtering [2]: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/privacy https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Web... [3]: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/dns https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Web...
- stephenr 6y ago> for example, there's no way to strip HTML content from a GET request I'm quite curious what legitimate use this has?
- danShumway 6y agoThere are a couple of reasons, but the biggest one is that intercepting HTML at the network level allows you to filter inline script tags from documents[0]. If you want to stop an inline script from running (say to defuse an anti-adblocker popup/redirect), you can't wait until after it gets parsed to remove it. Once it gets added to the page, the browser will execute it. Of course, note that uBlock Origin also supports scriptlets[1] that can be used to rein in scripts after they get added to the page, instead of by doing resource rewriting. You're not restricted to only doing your filtering at the network level, HTML filtering is just another tool that filter authors have at their disposal. Helpfully, at the scriptlet wiki page I've linked each entry also shows a practical example rule that relies on the scriptlet. You can also take a look at the uBlock Origin's default filter lists[2] if you want more examples of people using both HTML filtering and scriptlets in the wild. Many of these block rules are impossible to implement in Safari. [0]: https://github.com/gorhill/uBlock/wiki/Inline-script-tag-filtering https://github.com/gorhill/uBlock/wiki/Inline-script-tag-fil... [1]: https://github.com/gorhill/uBlock/wiki/Resources-Library https://github.com/gorhill/uBlock/wiki/Resources-Library [2]: https://github.com/uBlockOrigin/uAssets https://github.com/uBlockOrigin/uAssets
- specialist 6y agoNice ELI5s/TLDRs, thank you. Sharing notion (dumb question) here, since you're smart about this stuff: At what point will "ad blocking" flip to "content scrapping"? All this cat & mouse, arms race seems like a bad ROI. I imagine an adaptive super reader view mode. Meaning emphasis on content scrapping rules vs ad blocking rules. Take snapshots of top websites, do some rendered page aware content diffing, with some user directed setting & curation, infer where the content is, distill that down to "good enough" scrapping rules. Any way. Thanks for answering some of my lingering questions.
- saagarjha 6y agoIt requires an Electron app to run in the background to provide much of its functionality.
- jerrysievert 6y agoit quite clearly says: "Please note that content blocking in Safari operates even when the app is not running" considering that the free extension is built to block ads in Safari, it seems to be doing this just fine without the app running.
- saagarjha 6y agoNo, I know that. The issue is that the actual app extension itself (which is written in Swift and useful for things like picking elements from the page, etc.) will pretend like it cannot function without the Electron app running. Some more details: https://github.com/AdguardTeam/AdGuardForSafari/issues/84#issuecomment-443849653 https://github.com/AdguardTeam/AdGuardForSafari/issues/84#is...
- GeekyBear 6y agoThey also have a set of free public DNS servers with a built in blocklist. No additional software required at all. https://adguard.com/en/adguard-dns/overview.html https://adguard.com/en/adguard-dns/overview.html
- deleted 6y ago[deleted]
- tyingq 6y agoImagine a malware scanner that relied only on a fixed size static list of md5 hash signatures. No heuristics.
- austhrow743 6y agoIf adguard’s VPN adblocking solution is anything like NextDNS’ Then it doesn’t block ads on YouTube, which is a pretty big source of ads for the lay user.
- Terretta 6y agoTry 1Blocker, you might be surprised what it does offer: https://1blocker.com/ https://1blocker.com/
- danShumway 6y agoIt's not Open Source, and if it's running in Safari it doesn't have access to any of the APIs I mention elsewhere[0]. I'm sure it's a great extension with a lot of work put into it, but there is no realistic way 1blocker can match the best ad blockers in Chrome/Firefox unless it's hacking Safari behind the scenes to inject new APIs. [0]: https://news.ycombinator.com/item?id=23622206 https://news.ycombinator.com/item?id=23622206
- foepys 6y agoDoesn't Apple's content blocking API limit the number of rules at 50,000 rules per extension? uBlock Origin uses 85,000 rules from EasyList alone. That's without country-specific and privacy rules. I have about 180,000 active rules at the moment.
- saagarjha 6y agoThat is correct. Many content blockers ship with multiple extensions to try to get around this rule. (EasyList can compress a bit, FWIW.)
- hombre_fatal 6y agoTo elaborate further on your comment, you can programmatically enable/disable/change/recompile nested rules from your master extension. I wonder if half the reason the 50k rule limit exists is so developers don't end up with an append-only infinite rule list that takes 20 seconds to recompile. If you're stuck turning 200k rules into four lists of 50k rules, you can just recompile each one on its own thread and all of it will take a couple seconds max.
- waon 6y agoThat's certainly ideal, and for the most part, Safari content blockers work reasonably well. However, there are things you currently can't block using Safari content blockers that can be blocked with uBlock origin. One of the most prominent examples are CSS classes, and the inability to block them becomes a real pain if you open the mobile Reddit website. Their mobile website disables scrolling if you block their pesky "use our mobile app" popups.