我有一个简单的问题,但找不到我正在寻找的答案。
加载到安全 https 页面上的 http iframe 是否也受到保护?
最佳答案
带有 http 源的 iframe 不会显示在 https 网站上,因为它被认为是混合内容,Chrome 等浏览器会阻止该内容并显示以下消息:
Mixed Content: The page at 'your website' was loaded over HTTPS, but requested an insecure resource 'iframe http source '. This request has been blocked; the content must be served over HTTPS.
到目前为止,我还没有看到允许混合内容的解决方案。 Firefox 有一个解决方案,它基于通过托管在 HTTPS 域上的另一个网站重定向 iframe 源。
关于HTTPS 页面上的 HTTP iframe,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9015850/