首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 互联网 >

Mixed Content Blocking罗致Firefox23 无法显示iframe

2013-10-08 
Mixed Content Blocking导致Firefox23 无法显示iframe问题前些天遇到了一个神奇的问题:有个网页包含了ifra

Mixed Content Blocking导致Firefox23 无法显示iframe
问题

前些天遇到了一个神奇的问题:有个网页包含了iframe,之前一直运行良好,但是Firefox升级到最新的23.0版本后,发现iframe内的内容变成空的了!查看元素iframe里只有<html><body></body></html>。其他浏览器都没有问题。


原因

stackoverflow上有人说是因为使用了样式display:none;的缘故:

In google chrome the div contains an inline style of display:block (and a background-image). But in firefox the div it doesn't have thedisplay:block (only the background image). So, the problem is that teir scripts are not "showing" the map's div.

see http://stackoverflow.com/questions/13790728/iframe-not-working-in-firefox

查了iframe src引用的网页源码,确实有这个样式!但是,把它去掉后,问题依旧。。。


后来偶然发现控制台上有打印:

点击地址栏的盾牌图标,选择Disable Protection on This Page;就会显示iframe;之后这个盾牌图标会变成一个感叹号图标。

解决方案3

但上述方案只对当前session有效,重启浏览器后又会被阻止。要让Firefox默认不阻止:

地址栏输入about:config进入配置页面,找到security.mixed_content.block_active_content,把它设为false。

Mixed Content Blocking罗致Firefox23 无法显示iframe





热点排行