柔性的iframe错误:该内容不能被显示在一个帧柔性、错误、内容、iframe

由网友(后排幽魂)分享简介:我有我的测试创建了一个简单的Flex应用程序。我下载flex-iframe-1.4.6.zip库,并使用这个库,我想显示的URL。但它不显示该网页,而不是它显示了一个错误:此内容不能被显示在一个帧I have a simple flex application that I created for testing....

我有我的测试创建了一个简单的Flex应用程序。我下载flex-iframe-1.4.6.zip库,并使用这个库,我想显示的URL。但它不显示该网页,而不是它显示了一个错误:此内容不能被显示在一个帧

I have a simple flex application that I created for testing. I download "flex-iframe-1.4.6.zip" library and using this library I am trying to display a url. But it does not show the web page instead it shows an error: "This content cannot be displayed in a frame".

<flexiframe:IFrame id="mapIFrame" visible="true" 
    source="http://www.google.com" width="500" height="500" label="Google"/>

我该如何解决这个问题呢?

How can I solve this problem?

推荐答案

该消息的此内容无法显示在一帧的是从Internet Explorer来了。

The message "This content cannot be displayed in a frame" is coming from Internet Explorer.

请参阅 IE8安全第七部分:点击劫持防御的:

Web开发人员可以发送的X FRAME-OPTIONS HTTP响应头命名   与HTML页面来限制如何页面,可拟。如果   的X FRAME-OPTIONS值包含令牌DENY,IE8将prevent的   从渲染它是否将被包含在一帧内的页面。如果   值包含令牌SAMEORIGIN,IE将阻止渲染只有当   顶层浏览上下文的原点比不同   包含X-FRAME-OPTIONS指令内容的由来。

Web developers can send a HTTP response header named X-FRAME-OPTIONS with HTML pages to restrict how the page may be framed. If the X-FRAME-OPTIONS value contains the token DENY, IE8 will prevent the page from rendering if it will be contained within a frame. If the value contains the token SAMEORIGIN, IE will block rendering only if the origin of the top level-browsing-context is different than the origin of the content containing the X-FRAME-OPTIONS directive.

google.com`s电流响应报头包含:X帧选项:SAMEORIGIN

google.com`s current response header contains: X-Frame-Options: SAMEORIGIN

因此​​,答案是:你不能在iframe中使用 http://www.google.com

So the answer is: you can't use http://www.google.com in an iframe.

因此​​,在该柔性的iframe用户导向已过时(最后一次编辑2年前)。

Accordingly, the example in the flex-iframe users guide is outdated (last edit 2 years ago).

阅读全文

相关推荐

最新文章