Code
<head>
<script>
<!-- Hide Script
if (top.location != self.location) {
top.location = self.location
}
//End Hide Script-->
</script>
</head>
if (top.location != self.location), the script checks if the location of the current (self) page is the top most in the browsers window hierarchy. If so, there’s no need to change anything.
But if it does not match, your script will assign self.location to top.location (top.location = self.location) and make the current window reload and display your page and your page only! You can see a nice working example, if you try to load CNN’s site in a frame. You will see that the page reloads and displays CNN only.