Anti iframe detection & referrer blocking script -- 2

Cancelled Posted Jan 28, 2016 Paid on delivery
Cancelled Paid on delivery

1. The problem

Sometimes I need to embed my html pages into other domains as iframe, my html pages contain the affiliate ID from affiliate networks. The problem is - the affiliate networks only permit that ID to be displayed on my own domain. They typically employ JavaScript tracking code on my page body (some times also on head) that send my browser info to their servers to enforce the same-domain policy.

To illustrate how it looks:

[url removed, login to view]

<html>

<head>

<SCRIPT SRC="[url removed, login to view]" TYPE="text/javascript"></SCRIPT>

</head>

<body>

some content...

<SCRIPT SRC="[url removed, login to view]" TYPE="text/javascript"></SCRIPT>

more contents...

<SCRIPT SRC="[url removed, login to view]" TYPE="text/javascript"></SCRIPT>

...

more contents...

<SCRIPT SRC="[url removed, login to view]" TYPE="text/javascript"></SCRIPT>

</body>

</html>

On their tracking server, they typically employ Javascript code to check if the affiliate ID is indeed on the target domain, not be iframed into other domains.

[url removed, login to view]

if [url removed, login to view] !== self //they know the aff ID is iframed to other domains

var whoFramedMe = [url removed, login to view] //they know top domain

What makes things complicated is that different affiliate networks use different DOM property aliases, some examples:

if top !== self

if [url removed, login to view] !== self

if [url removed, login to view] !== [url removed, login to view]

if [url removed, login to view] != [url removed, login to view]

and so on... you can see for one [url removed, login to view] property, there can be many combination of variations.

Some may also use:

[url removed, login to view]

[url removed, login to view]

...

My requirements:

1. In the event of I iframing [url removed, login to view] into other domains, I need JavaScript code on [url removed, login to view] to make their detection script think their pages are NOT iframed, e.g. everything is fine, the affiliate ID is still shown on my_domain.com.

2. I also need the JavaScript code on [url removed, login to view] to block the referrer tracking by the affiliate networks, e.g. I don't want to reveal where my visitors are coming from.

Please note that I may place multiple iframes (from different affiliate networks) into one page, therefore an universal anti detection script will be ideal and highly desired. Otherwise you will have to develop a separate script for each of the networks.

JavaScript jQuery / Prototype

Project ID: #9506340

About the project

Remote project Active Jan 29, 2016