frame buster workaround

How do I get a page with a 'frame buster' opened inside an IFRAME or FRAMESET?

target's onload attribute:
--
if (self !=top) top.location = location
--
japoneixAsked:
Who is Participating?
 
thirdConnect With a Mentor Commented:
i don't think there's a workaround with that. the only workaround i have on my head is, you have to ask permission to the owner.
0
 
ehoutCommented:
I'm not a Javascript Guru, but maybe it is possible tot redefine the "top" object ?

Kind regards
0
 
thirdCommented:
nope. can't be done, AFAIK.
0
 
jaysolomonCommented:
third is correct

...and i am glad that you can't b/c i use it in every site i develop regardless

0
 
tomwoodsCommented:
Try this out, it works fine for me. Cheers.

<script language="Javascript">
<!--
if (top.location!= self.location) {
top.location = self.location.href
}
//-->
</script>
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.