Motyar

@motyar

Freelance Web Developer

Static Web Hosting, made easy

Mar 23, 2010

break frames - Don’t let your site be framed

I was trying to use my Google profile page in a HTML frame, but they don't let me do so. You should never trust framed services, because they can prevent you.

Here is a simple JavaScript solution.

Code

JavaScript

 if(top.location != self.location){ 
   top.location self.location;
 }

 

Whenever someone paste this page in their frame in will redirect the window to frame href.

Labels:




By :