[JavaScript/Adblock] Thwart ad-block detection
by Michael Uplawski from LinuxQuestions.org on (#5GEJX)
Good afternoon
This is more a request for confirmation than an open question.
If I have understood correctly, ad-blockers target elements in the HTML-code and many of them are constant, i.e. attributes or similar which are known to be the mark of advertisements placed on a web-page.
There is even a list of such elements, which are usually handled by an ad-blocker.
In the same way, Web-authors can choose to detect ad-blockers by simple trial and error testing.
I wonder if it is the sheer volume of attributes which must be taken into consideration which prevents us from fooling advertisers to believe that they can successfully place their ads. Otherwise, what hinders an ad-blocker to remove an advertisement but to re-introduce the relevant attribute with an empty HTML-element, or, even, to maintain the original element in place.
I do not understand, how detecting ad-blockers appears to be a straight-forward affair and preserving ad-blockers from detection is not.
You can give me a code-example, if you want, but I am afraid that - if my forebodings are right - I will not comprehend it.


This is more a request for confirmation than an open question.
If I have understood correctly, ad-blockers target elements in the HTML-code and many of them are constant, i.e. attributes or similar which are known to be the mark of advertisements placed on a web-page.
There is even a list of such elements, which are usually handled by an ad-blocker.
In the same way, Web-authors can choose to detect ad-blockers by simple trial and error testing.
I wonder if it is the sheer volume of attributes which must be taken into consideration which prevents us from fooling advertisers to believe that they can successfully place their ads. Otherwise, what hinders an ad-blocker to remove an advertisement but to re-introduce the relevant attribute with an empty HTML-element, or, even, to maintain the original element in place.
I do not understand, how detecting ad-blockers appears to be a straight-forward affair and preserving ad-blockers from detection is not.
You can give me a code-example, if you want, but I am afraid that - if my forebodings are right - I will not comprehend it.