Changes

Jump to: navigation, search
How Ad Reinsertion Works
== How Ad Reinsertion Works ==
Ad reinsertion refers to the process of backfilling blocked advertising space on a web page with alternate content. As previously discussed, ad blockers prevent ads from appearing either by blocking communication with ad servers, or by hiding web page elements containing identification patterns that match entries in the ad blocking list (if, for example, a <div> element has a class name of “banner_ad” the ad blocker will hide this element from view).
If an ad has been prevented from appearing by blocking communication with the ad server, and the ad is not embedded in a <div> element that matches any ad blocker list entries, then the now empty element is essentially still displayed on the web page. Not only is this element still visible, it is also accessible to you via JavaScript code. If an element is both visible and accessible, you can write new content to it.
In the chapter entitled Basic [http://www.ebookfrenzy.com/AdBlocking/index.html Ad Blocker Detection Techniques] we learned how to detected the presence of an ad blocker. In the JavaScript examples provided, the detection code simply outputs a message to the JavaScript console to report the detection of an ad blocker. The concept of reinsertion uses the same technique to detect an ad blocker, but goes one step further by writing new content to the blocked web page elements.
== Limitations of Ad Reinsertion ==

Navigation menu