简体   繁体   English

禁用iframe重定向,但显示页面

[英]Disable iframe redirection, but show the page

I am working on a website, that displays different traffic exchanges to surf multiple sites at the same time. 我正在一个网站上工作,该网站显示不同的流量交换以同时浏览多个站点。 But I have some problem with sweeva. 但是我对sweeva有一些问题。 If I set the src of the iframe to sweeva.com/sweeve, it redirects the top/parent window to the same url. 如果我将iframe的src设置为sweeva.com/sweeve,则会将顶部/父窗口重定向到相同的网址。 I can block the redirection, but I can't see the page itself. 我可以阻止重定向,但是看不到页面本身。

Is there any way to detect and disable the script, that redirects, but display the site? 有什么方法可以检测和禁用重定向并显示站点的脚本?

Or is there some way to not to tell that it is in an iframe? 还是有某种方法可以不告诉它是否在iframe中?

Short answer is: no. 简短的答案是:不。 If the page you are trying to put in an frame (iframe, object, etc) has "frame-busting" code in it then you can only stop the redirect. 如果您要放入框架(iframe,对象等)的页面中包含“破坏框架”代码,则只能停止重定向。 But you can't show the content. 但是您无法显示内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM