I'm Motyar, an entrepreneur and API developer from India

Creating value through Programming

DigitalOcean Cloud hosting for developers
20GB SSD, 512MB RAM - only $5 per month

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.


By :