开发者

My frame is redirecting page !! How to stop it? [duplicate]

This question already has answers here: Closed 12 years ago.

Possible Duplicate:

How to prevent IFRAME from redirecting top-level window 开发者_开发知识库

<iframe width="980px" frameborder="0" marginheight="0" marginwidth="0" height="1500px" src="http://www.torrentz.com/search?q=<?php echo $_GET['search'] ?>" ></iframe>

I have a frame like this.Now when i run tun this in my page..its startes redirecting my to "torrentz.com"..

Have any idea how to stop it ?


It's doing something known as "framebusting."

While you can stop that from happening, you really shouldn't do it. If a website has framebusting code, they don't want their site to be in frames. So you should respect that and don't embed it.

Related: How to prevent iframe from redirecting top-level window, Block iframe from setting parent.location, How can I stop child Iframes from redirecting


I guess that torrentz.com does some unboxing from the iframe (prob. with javascript). In the setup you describe you can't avoid it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜