Forum Moderators: phranque

Message Too Old, No Replies

How to stop framing of my website?

         

trader

3:35 pm on Apr 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi, I ran across several sites framing my site so their page is listed in the SE but based on my URL. They then put their own Adsense on the top of the page but with my framed content below.

Amazingly sometimes the scam site actually ranks better in the SE's than my real site being framed! I complained to Adsense about it many mos ago but I see no indication they did anything to stop it and got little specific response from Google. In fact, based on the reply I did get it seemed like they did not even understand the issue.

Was wondering if the 2 javascripts below would put a stop to it and also which one of the 2 is best to use as there is a difference, though I am not sure what effect they have? Should we use both of them seperately or somehow merge the 2 together if that is possible or even needed?

Also, should the code be inserted before or after the </head>?

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

<script language="JavaScript" type="text/javascript">
if (window!= top) top.location.href = location.href;
</script>

skipfactor

3:42 pm on Apr 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think I got this from Jim (jdMorgan) in a post somewhere. Place at bottom of page right before the </body>:

<script language="JavaScript1.1" type="text/JavaScript">
if (parent.frames.length > 0) top.location.replace(document.location);
</script>