Forum Moderators: martinibuster

Message Too Old, No Replies

Adsense safe framebusting code?

         

emodo

1:34 am on Oct 8, 2005 (gmt 0)

10+ Year Member



I am looking for a framebusting code that does not cause adsense ads to doubleload.

Anyone have one?

incrediBILL

1:43 am on Oct 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Any frame busting will work and not double load as long as you put it in the <HEAD> of the page and not the <BODY>. If the code is in the HEAD it's executed before the page starts to display unless you're using a defective browser.

Try this in the HEAD of your page:

<script LANGUAGE="JAVASCRIPT" type="text/javascript">
if (top!= self) top.location.href = location.href;
</SCRIPT>

Andkon

1:49 am on Oct 8, 2005 (gmt 0)

10+ Year Member




if (parent.frames.length > 0) {
parent.location.href = self.document.location
}

Above also works, just put it in the head in a script element.