Mixed Content Blocking导致Firefox23 无法显示iframe
来源:互联网 发布:unity3d awake start 编辑:程序博客网 时间:2024/06/07 23:34
转载自:http://blog.csdn.net/vking_wang/article/details/11659725
问题
前些天遇到了一个神奇的问题:有个网页包含了iframe,之前一直运行良好,但是Firefox升级到最新的23.0版本后,发现iframe内的内容变成空的了!查看元素iframe里只有。其他浏览器都没有问题。
原因
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 the display: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引用的网页源码,确实有这个样式!但是,把它去掉后,问题依旧。。。
后来偶然发现控制台上有打印:
[plain] view plain copy print?
已阻止读取混合活动内容 “http://10.235.59.215:8888/…….”
google之后发现Firefox23默认阻止读取混合活动内容!see Mixed Content Blocking Enabled in Firefox 23!
那么什么是混合活动内容呢?当一个HTTPS页面中包含HTTP内容时,即使主页面是经过SSL加密受HTTPS协议保护,但其中的HTTP内容可以被攻击者阅读或更改;这种HTTPS页面包含HTTP内容的情况,就被称为“混合内容”。
这种内容是不安全的,如果主页面是HTTPS,但iframe src引用HTTP内容,Firefox23默认会阻止这种内容的显式!
解决方案1
最直接的解决方法就是避免这种混合内容,将iframe src改为HTTPS即可。
解决方案2
但iframe引用的页面不支持HTTPS怎么办?可以让Firefox暂时不阻止:
点击地址栏的盾牌图标,选择Disable Protection on This Page;就会显示iframe;之后这个盾牌图标会变成一个感叹号图标。
解决方案3
但上述方案只对当前session有效,重启浏览器后又会被阻止。要让Firefox默认不阻止:
地址栏输入about:config进入配置页面,找到security.mixed_content.block_active_content,把它设为false。
- Mixed Content Blocking导致Firefox23 无法显示iframe
- Mixed Content Blocking导致Firefox23 无法显示iframe
- Mixed Content混合内容错误 Iframe Http页面无法访问
- Mixed Content Page
- Handling Mixed (HTTPS/HTTPS) Content
- cache blocking 效果显示
- td中放了iframe怎么iframe无法显示了
- 浏览器报Mixed Content错误的解决
- IE6 bug:iframe空白,无法显示内容
- Grails 中iframe 页面无法正常显示
- IE 不接受 iframe cookies (IE Blocking iFrame Cookies)
- 图片格式错误导致IE无法显示图片
- scrollview嵌套listview导致无法正常显示
- xorg.conf变更导致开机无法显示
- webpack配置导致字体图标无法显示
- BLOCKING
- https中请求http资源报错Mixed Content
- 如何在HTTPS 网页中引入HTTP资源: Mixed Content?
- find命令详解
- SylixOS CAN总线报文浅析
- 创建表空间时UNIFORM SIZE的通俗含义(翻译)
- Hibernate中持久化类
- HTTP协议分析系列(四)------重定向
- Mixed Content Blocking导致Firefox23 无法显示iframe
- POJ 3278 Catch That Cow (BFS)
- c函数之gettimeofday()函数获取系统时间
- vijos P1066弱弱的战壕
- Java web项目 在线网络考试数据库连接部分代码
- 申请美国名校条件一览 雅思成绩对申请者有最大裨益
- python初学者要注意的问题
- jpa hibernate分页查询
- HTTP协议分析系列(五)------php+socket编程发送http请求