Freelance Web Developer

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.



 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.


If anything helps, feel free to buy me a beer.

By :