An Overview of Ad Blocking Technology

From Techotopia
Revision as of 19:54, 27 October 2016 by Neil (Talk | contribs) (Text replacement - "<table border="0" cellspacing="0">" to "<table border="0" cellspacing="0" width="100%">")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
PreviousTable of ContentsNext
Ad Blocking and the State of Online AdvertisingAd Blocker Detection Techniques


You are currently reading the online edition of this book.

Purchase this Ad Blocking Survival Guide book in eBook ($19.99) or Print ($25.99) format.

Buy Print Preview Book


Before exploring strategies to address ad blocking, it is first important to gain a basic understanding of the way in which ad blocking works. This chapter will provide an overview of the different forms of ad blocker and outline the key ways in which most ad blocking technology works.


Contents


Different Types of Ad Blocker

The most common and widely used type of ad blocker takes the form of a web browser extension or plugin, invariably available for installation free of charge with just a few clicks. Custom web browsers are also available with built-in ad blocking capabilities.

Ad blocking within enterprise networks is often implemented using software or hardware devices that are installed within or alongside gateway internet routers.

In addition, some mobile network and internet service providers are considering implementing ad blocking at the network level, thereby stripping out ads from content before it is delivered to customer devices.

You are currently reading the online edition of this book.

Purchase this Ad Blocking Survival Guide book in eBook ($19.99) or Print ($25.99) format.

Buy Print Preview Book

How Ad Blocking Works

Ad blocking typically employs two techniques to eliminate advertising from a web page.


Hiding Advertising Elements

A web page is actually a document that describes how the page is to be rendered within the web browser window. It contains the text, formatting directives, scripts and images that make up the content and behavior of the page that is to be presented to the user.

Browser-based ad blocking is centered around the Document Object Model (DOM). The DOM provides a structured representation of the content of the web page together with a programming interface allowing the content to be accessed and changed. It is the DOM, for example, that enables the interactive nature of web pages to be implemented, such as hiding and showing sections of a web page based on user selections, or dynamically changing the style or color of different page elements.

Either before or after the web page loads (depending on the browser type), ad blockers scan the web page document using the DOM to identify any content elements that contain advertising. When ad related content is identified, the DOM programming interface is used to hide those elements from view.

The diagram shown in Figure 3-1 illustrates ad elements hidden by an ad blocker in the form of a web browser extension:


Diagram outlining how ad blockers hide ad elements in a web page

Figure 3-1

You are currently reading the online edition of this book.

Purchase this Ad Blocking Survival Guide book in eBook ($19.99) or Print ($25.99) format.

Buy Print Preview Book

Blocking Access to Ad Servers

When a web page containing ads loads into the browser, it contains JavaScript code designed to contact the ad servers that provide the ad content to be displayed. The second technique used by ad blockers involves preventing the browser from contacting those ad servers, thereby preventing the ad from being downloaded and displayed to the user.

Though the exact techniques differ from one web browser type to another, all browsers provide some mechanism for blocking access to external resources such as ad servers. Ad blockers simply use these mechanisms to ensure that any attempt to communicate with a known ad server is blocked (Figure 3-2).


Diagram outlining how ad blockers prevent a web page from contacting ad servers

Figure 3-2


The providers of network level ad blocking offer less detail about how their technology works, though it is likely that a combination of hindering ad server communication and on-the-fly modification of web page content prior to delivery of the page to the user’s device are employed to provide similar results.

To see this technique in action, install an ad blocker extension into your web browser of choice and enable it. Display the JavaScript console for the browser using the appropriate steps from the following table:

Browser Steps to Display Console
Google Chrome Ctrl-Shift-J
Firefox Ctrl-Shift-J
Internet Explorer F12
Microsoft Edge F12
Safari Select Safari -> Preference menu.

Click on the Advanced Tab.

Enable “Show Develop menu in menu bar”.

Press Option-Command-C.

Once the JavaScript console is visible, navigate to a web page containing ads and note the output that appears in the JavaScript console. Among other errors, each blocked attempt to connect with an ad server will be reported within the console. Figure 3 3, for example, shows a list of blocked ad server connections within the JavaScript console of the Chrome web browser:


Ad Blocking diagnostics in the JavaScript console of a browser

Figure 3-3

You are currently reading the online edition of this book.

Purchase this Ad Blocking Survival Guide book in eBook ($19.99) or Print ($25.99) format.

Buy Print Preview Book

Ad Blocker Lists

Having covered how ad blockers hide ads and block ad server communication, the question that remains as to how they know what to block and what to leave alone. This is achieved primarily through the use of filter lists (also referred to as blacklists) which contain sequences of patterns designed to match all of the ad server addresses and web page element names that are known to contain ads. The most widely used filter list is EasyList which is used by the AdBlock Plus ad blocker. The content of this file can be reviewed using the following URL:

https://easylist-downloads.adblockplus.org/easylist.txt

The list contains, for example, the following entry:

||contextweb.com^$third-party

The web domain contained in the above filter references an ad server used by an online advertising network and inclusion in the list ensures that any attempt by a web page to access this server will be blocked. Similarly, the list contains entries such as the following:

##.advert
##.banner_ad
These entries dictate that any elements within the web page with class names matching either “advert” or “banner_ad” should be hidden from view. The following
element, for example, would be hidden by the ad blocker if encountered in the DOM of a web page:
<div class="advert">
    // Ad code here
</div>

In addition to the lists containing filters for ad elements and ad servers, privacy lists are also used to block tracking scripts (such as those used by Google Analytics).

In general these lists are user generated in so far as suggestions for additions to the list are submitted by users of the ad blocking tools. If an ad blocker user visits a page where ads are still visible, the user may pass information about the ad element and ad server to the people who maintain the filter list for that particular ad blocker. One of these maintainers will, subject to reviewing the suggestion, create a filter to block the ad and append it to the list.

Summary

Before addressing the issue of ad blocking it is helpful to first gain an understanding of how ad blocking technology usually works. Ad blockers take a variety of forms including web browser extensions, software solutions and hardware devices.

Ad blocking typically uses two techniques to eliminate advertisements. The first involves the identification of ad elements within a web page and, using the Document Object Model (DOM), hiding those elements from view. The second part of the process involves blocking any attempt by the ad code within a web page to connect to the ad server to obtain the ad content.

Many ad blockers (particularly those provided in the form of a web browser extension) access filter lists to identify the content elements to hide and ad server addresses to block.

PreviousTable of ContentsNext
Ad Blocking and the State of Online AdvertisingAd Blocker Detection Techniques


You are currently reading the online edition of this book.

Purchase this Ad Blocking Survival Guide book in eBook ($19.99) or Print ($25.99) format.

Buy Print Preview Book



Navigation menu