Stumping the Facebook Frame
Sure, we all have a Facebook account, but do we really want them framing our websites?
I don't want to get into why you would want to stop them from framing your site, but I will let you know how to prevent it from happening. If you want to learn more about Facebook and other websites that are framing your website, Check out this post on Frame Spammers. Now, to the good stuff!
According to a post on tomuse.com, you can regain your privacy by adding a simple javascript in the head of your page. It is as simple as inserting the following code between the <head> </head> tags of your page.
<script language="JavaScript" type="text/javascript">
if (top.location != self.location) top.location.replace(self.location);
</script>
I hope everyone finds this helpful.
- rickyd's blog
- Login or register to post comments
It works!
klou — Mon, 2009-07-13 09:15That is one useful little script!