Page 1 of 1

How to ensure your page is not opened in a frame

Posted: Sun Nov 29, 2009 4:50 am
by Tony
If you want to make sure your website is not opened in a frame from some other website, put this JavaScript in the <head> of your html page:

Code: Select all

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