2 ms·
> Ublock receives the page being visited and it needs to return an array of elements to block. The browser can do the replacement and element stripping itself.
by lapcat 2y ago
> Ublock receives the page being visited and it needs to return an array of elements to block. The browser can do the replacement and element stripping itself. This is the approach Safari takes on iOS for content blocking extensions.
> Instead, Chrome went with a “limited set of static patterns in JSON format” approach, which rules out or limits a lot of use cases.
You're incorrect about Safari content blockers, which also use a limited set of static patterns in JSON format. It's basically the same approach as Chrome's Declarative Net Request. (By the way, I'm the developer of a Safari content blocker, as well as a number of browser extensions.)