柔性的iframe错误:该内容不能被显示在一个帧 [英] flex-iframe error: This content cannot be displayed in a frame

查看:338
本文介绍了柔性的iframe错误:该内容不能被显示在一个帧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我的测试创建了一个简单的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.

请参阅<一href="http://blogs.msdn.com/b/ie/archive/2009/01/27/ie8-security-part-vii-clickjacking-defenses.aspx"相对=nofollow> 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).

这篇关于柔性的iframe错误:该内容不能被显示在一个帧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆