• DefederateLemmyMl@feddit.nl
    link
    fedilink
    English
    arrow-up
    6
    ·
    7 hours ago

    Your understanding is not correct. For page elements, uBlock prevents the domain from even trying to load, so no DNS request is ever made. Only if you go directly to an ad domain from the url bar (who does that?), does a DNS request get made.

    For example, on my own webserver, I created a simple static html file with an <img> tag pointing to an ad domain that I know is blocked on uBlock as well as on the pihole. Like so:

    <html>
    adblock test
    <img src="https://track.adtrue.com/some/bannerad.png"></img>
    </html>
    

    Loading that page, uBlock showed 1 blocked ad on that page, pihole only logged a DNS request to my webserver, not to track.adtrue.com.

    Once I turned off uBlock in the browser and reloaded the page, pihole did log the request to track.adtrue.com and blocked it. My browser showed a broken image.