Remove Frame with Javascript


By most, it's called the "Frame Buster." There are multiple ways to do it. What do they do? Use these snippets of javascript to remove any potential frame your site might be in. Either are viable solutions.

<script type="text/javascript">
if (top.frames.length!=0)
top.location=self.document.location;
</script>

or even

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

It's a small bit of code, but it could be put into an external file and linked to if you wanted.


User login

Who's online

There are currently 0 users and 0 guests online.

Latest Articles

Powered by Drupal - Design by Artinet - © 2007 SEO Cactus