Forum Moderators: martinibuster

Message Too Old, No Replies

Frame busting: Good or Bad?

Who ya' gonna call...

         

wizarddave

6:46 pm on Oct 25, 2005 (gmt 0)



I discovered this morning that someone is framing one of my high-earning sites. I looked back in old posts here on WW, and there were some posts that advocate doing frame busting and some that said it was a bad thing (because of impression doubling).

What's the consensus on this? Is it OK for an AS publisher to have frame breaking javascript on every page?

Also, what's the best code? (Or do they all do pretty-much the same thing?) Is there one way of doing it to particularly avoid?

Thanks, all!

incrediBILL

9:02 pm on Oct 25, 2005 (gmt 0)

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



There's no impression doubling if you bust the frame in the <head> part of the page as the <body> hasn't been displayed yet.

Just keep in mind some people couldn't find their butt with both hands and a flashlight and take much of what you read with a grain of salt.

Try this...

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

Nikke

9:16 pm on Oct 25, 2005 (gmt 0)

10+ Year Member



find their butt with both hands and a flashlight

I found it! Thanks for that flashlight tip...

Mine is a little bit different, but actually does the same thing:

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

andrea99

9:27 pm on Oct 25, 2005 (gmt 0)



I have used this for over two years with no problem I'm aware of. Are the shorter versions better?

<script language="JavaScript" type="text/javascript">
<!--Break out of frames
if (top.frames.length!=0)
top.location=self.document.location; //-->
</script>

incrediBILL

9:29 pm on Oct 25, 2005 (gmt 0)

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



I wouldn't worry about it -
All 3 do about the same thing in slightly different ways

Nikke

9:41 pm on Oct 25, 2005 (gmt 0)

10+ Year Member



wizarddave!

If you copy any of the above, make sure to add a space befor the exclamation mark as in (!=).
WebmasterWorld has a built in feature to remove traling spaces and in incrediBILL's and andrea99's examples the space got snipped.

wizarddave

10:17 pm on Oct 25, 2005 (gmt 0)



I'm testing this configuration:

<script language="JavaScript1.1" type="text/javascript"><!-- // hide from old browsers
if (parent.frames.length > 0) top.location.replace(document.location);
// Escape from any referring site's frame, but preserve one-click "Back". -->
</script>

I think Ann posted this in a thread sometime back... (thanks!)

jdMorgan

10:54 pm on Oct 25, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The acid test for a frame-busting script is whether it breaks the "Back" button or not. The visitor should be able to navigate back to the framing site if he/she really wants to do so. Some of the frame-buster scripts will preserve the navigation history, and some won't, so test before deciding "they're all the same" -- they're not.

Jim

ann

12:05 am on Oct 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks wizard Dave,

I picked that up here on webmaster world but can't remember who wrote it. Works like a charm and preserves the back button.

I tested it out on AskJeeves :)

jdMorgan

12:23 am on Oct 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



:)

Jim

ann

1:46 am on Oct 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



OHO,

Thanks Jim :)

incrediBILL

5:39 am on Oct 26, 2005 (gmt 0)

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



FYI, a quick and easy place to test frame busting is the Netscape Search page:

[channels.netscape.com...]

The code I listed above allows the back button but the frame busting used on my competitors site doesn't - unless you click back 2 times REAL FAST ;)

My competitor also did double page impressions but that was because the frame busting code was on a timer - why in the heck would anyone bust a frame on a timer?

Never mind - just answered my own question. Don't know if it's deliberate or not but there's a frame at the top of the site that displays a CPM ad and the timer seems to go off just about right after the CPM ad is displayed before the rest of the page.

Looks like double impressions *might* be the intent!

Nasty.

larryhatch

6:33 am on Oct 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have one site, about 140 pages. Each and every page busts frames,
in the head, and with a code that doesn't break the back button.
I can't think of a single reason not to do this.
For me the question is not whether, but how. -LArry