To prevent iframing, I added this code in the top scope (which means this==window):
if(top!==this)top.location.search="?removeFrame"
this works perfectly in all browsers other than IE(failed in IE 8, keeps refreshing, not sure whether it works in later versions), I think this is because IE doesn’t consider top==this even the main window is at the top
How to rewrite this code to make it compatible with IE?
try changing:
to
As per this post , we should avoid using strict
(===)operator when comparing window objects