A very easy way to ensure your site is not being displayed in a frame.
Here is the simple code used to ensure your site is not being displayed in a frame. This is good to use when you have people "scraping" your sites content by basically including your site in their code.
That is all it takes to "bust" out of a frame and ensure your site is displayed on top.
kristoficus Mon Nov 7, 2005 10:41 pm
Nice and simple tut matt :)
Small amount of code and very usefull. Great!
3 me's Tue Nov 8, 2005 12:27 pm
Nice, well known also but always handy. Any chance of putting examples of the code up so that people can see how it sould work and then they know if it's NOT working for them. ;)
Catch ya !
mkeefe Thu Nov 10, 2005 6:11 pm
Good idea on the example idea, I know some of them have examples and I will be adding them to more of the articles.
gangsta Sun Jul 30, 2006 12:55 pm
Bipin 3~ Upadhyay Tue Aug 14, 2007 3:50 am
This will not work in IE if the attackers embeds "security=restricted" parameter to the frame or iframe.
l8r Wed Nov 12, 2008 5:35 pm
Read Jeremy's posting on October 21st, 2008 at 5:58 am:
The stanford.edu/framebust stuff can be properly mitigated in this fashion.
Validate Site: XHTML CSS | Designed by: Matthew Keefe of mkeefeDESIGN