Simple JavaScript ‘Frame Busting’ Code
Here is a quick JavaScript code that you can use if you want to make sure that no one should be able to show your website in an IFrame.
<script type="text/javascript">
if (top !=self) {
top.location=self.location;
}
</script>
Just put this code in head section of your html page, and it will ensure that your page always get’s displayed outside the frames.
Related posts
- Fix ‘Blank page’ problem aka White Screen of Death
- Media Manager Browse Button Disabled In Joomla
- Configuring wireless routers
- Easy File Uploading Solution For PHP
- Solution To Session Timing Out Intermittently
Filed under how too? | Comments (3)
3 Responses to “Simple JavaScript ‘Frame Busting’ Code”


Was looking for this…
Thx
Thanks a lot for the help. This script works awesome.
Thanx this really helps me out…
**************************
Jack Brosnan
camper hire