i’m using following script to force a page to be loaded only within an iframe
<script type="text/javascript">
if (frameElement == null) {
//change location or close
window.location = "http://site.com/";
// or window.close();
}
</script>
it work very well in ie and firefox but not in chrome and safari
any solution for this browsers?
Try
if (top == window)instead.