The Flash and PHP Bible has been released! The book can be found on Amazon or wherever fine books are sold in your area.
The Flash and PHP Bible has a forum for quick support.
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.
Simply place the code in the "head" of your page or you could even place it in an external javascript file to cut down on filesize.
<script type="text/javascript">
if(top.location != location) {
top.location.href = document.location.href;
}
</script>
That is all it takes to "bust" out of a frame and ensure your site is displayed on top.
|
kristoficus Tue Nov 8, 2005 3:41 am
Nice and simple tut matt :)
Small amount of code and very usefull. Great! |
|
3 me's Tue Nov 8, 2005 5: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 11: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 4:55 pm
hell yes!
|
|
Bipin 3~ Upadhyay Tue Aug 14, 2007 7:50 am
Not Really.
This will not work in IE if the attackers embeds "security=restricted" parameter to the frame or iframe. Working Demo: http://crypto.stanford.edu/framebust/ |
|
l8r Wed Nov 12, 2008 10:35 pm
Read Jeremy's posting on October 21st, 2008 at 5:58 am:
http://ha.ckers.org/blog/20081007/clickjacking-details/#comment-87102 The stanford.edu/framebust stuff can be properly mitigated in this fashion. |
©2004 - 2010 scriptplayground | Privacy Policy | Legal
Validate Site: XHTML CSS | Designed by: Matthew Keefe of mkeefeDESIGN