← Back to context

Comment by amazingamazing

9 days ago

Ublock origin doesnt use javascript. The script just involves a tree traversal of the dom and removal of any node that says ad.

The issue is facebook obfuscates selectors so you cant easily do it the way ublock prefers.

Sorry, still don't understand. The dom is not complete until JavaScript has run, no? So the ublock extension can do dom traversal on the rendered page, but the proxy can only operate at the request level. I assume your not running a headless browser on your squid box, lol. I'm aware that a proxy can tweak html and js, but the js will be challenging to analyse statically. If you're only blocking requests to ad domains, then presumably most people would just block them in DNS. So i still don't understand what the proxy gains you.

  • No, not a traditional one. You would render the entire page in your server, remove the ads, copy the modified html and your client would get ad free copy. You are not blocking anything in the traditional sense. Ask claude to do it, it works.