Post #2436162
2023-08-29 10:32 UTC
@tarajdactyl@tech.lgbt @stefan@stefanbohacek.online Shouldn't a good adblocker be transparent and therefore undetectable for the website?
Replies (2)
-
@grishka@friends.grishka.me 2023-08-29 11:18
@ls@social.lsnet.eu, it's kinda impossible to build an undetectable ad blocker. If an ad fails to load, this affects the page layout, and that can be detected from JS by checking the sizes of the elements and/or traversing the DOM tree. Also onload/onerror events for ad-related scripts. Also the absence of global variables these scripts define. And simplest of them all — just try to load a URL that has ad-related words in it and see whether the request fails.
-
@p4@masto.ai 2023-08-29 18:15
@ls@social.lsnet.eu @tarajdactyl@tech.lgbt @stefan@stefanbohacek.online it doesn't need to actually detect the adblocker, you just need to get the adblocker to treat the warning like an ad and remove it from the page.