I use this for Anti-Frame:
<script language="JavaScript" type="text/javascript">
if (top.location != self.location) top.location = self.location;
How can I avoid to do frame break for visitors who come from Yahoo image search? They have referrer :
1 Answer 1
Just match the document.referrer and take appropriate action.
if (document.referrer.indexOf('images.search.yahoo.com') === -1) {
//break frame
}
answered Sep 11, 2011 at 9:33
Sahil Muthoo
12.6k2 gold badges32 silver badges39 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
lang-js