Site icon David Yin's Blog

How to protect your site from frame

I found some sites framed my Blog, and keep popping some bad windows.
I do a google, and found this script works to prevent from it.
Just copy the following code in to you pages. Now any site want to frame your page will automatically jump your site out.
<SCRIPT LANGUAGE=JAVASCRIPT><!–
if (top.location != self.location)top.location=self.location;
// –></SCRIPT>


<SCRIPT LANGUAGE=JAVASCRIPT><!--
 if (top.location != self.location)top.location=self.location;
 // --></SCRIPT>

Exit mobile version