Determining the Actions Required

There are a number of different ways to work out what actions need to be performed in the rules. In this case, the only action is to alter the response, so we need to determine where to make changes. Browsers like IE, Chrome and Firefox all provide developer tools to help identify specific elements in the page source code. In all of those browsers hit F12 to access the debugging tool if using Windows. For other platforms, please check the browser help instructions for how to access the tool. They all work in a similar fashion, but we will just cover Firefox Quantum version 60.0 operating on Windows 2012 Server in this example.

Click on F12 to open up the Inspector:

Browser inspecter

Click on the html inspector tool:

HTML selector

Now select the sponsored ads box:

adds html selected

This is where it is useful to know HTML, especially when dealing with a multinational site such as Google, as the tags tend to change from country to country. In our example, it is worth noticing that there are various advertising tags output within the source of the page.

There is a DIV with ID “rcnt”. To make the ads disappear you need to hide the tag using inline css styles.

To accomplish this:

</head>

becomes:

<style type="text/css">#rhs, #tvcap {display: none;}</style></head>

With this information to hand, the next step is to start building a rule set.

Last updated