webmaster resources tips and articles
webmaster information

Path = Home : HTML Design Tips : How To Prevent Your Site From Framed By Another Site

How To Prevent Your Site Being Framed By Another Site

 

Sometimes another site or search engine will enclose your site in a frame, here is how to prevent this happening.

Add this javascript code to the head section of your web pages just before the </head> tag.

<script language= "JavaScript">
<!--
if (top != self) { top.location = location; }
// -->
</script>

By adding this small snippet of javascript code, you will ensure your web site won't be framed. If your link is included within a frameset, when clicked on, it will always open in a new window and so break you out of the frame.

 

 

© janim.net 2000 - 2007 All rights reserved