【发布时间】:2014-11-26 12:14:50
【问题描述】:
在我启用 HTTPS 的网站中,我添加了一个 iframe,它应该显示来自我的其他网站的内容,但它在 https 下不起作用。
<iframe src="//myothersite.com"></iframe>
在 Firefox 最新版本中一切正常。
在 Chrome 中,iframe 未加载,在控制台中我看到这两个错误
Mixed Content: The page at 'https://mysite' was loaded over HTTPS, but requested an insecure resource 'http://myothersite.com'.
This request has been blocked; the content must be served over HTTPS.
Failed to load resource: net::ERR_CACHE_MISS
在 IE 内容加载不正确并且我看到一条警告消息;如果我点击允许不安全内容,它会正确加载。
问题是:我如何才能像在 Firefox 中那样使用 IE 和 Chrome(加载混合内容而没有任何警报)?
注意:我没有更改任何浏览器设置。
【问题讨论】:
标签: google-chrome security iframe https mixed-content