混合内容错误与警告
问题描述:
什么决定一个不安全的资源是封锁还是加载?从浏览器53混合内容错误与警告
创建者:
(function(){var d=document.getElementsByTagName('IMG');for(var i=0,l=d.length;i<l;i++){d[i].setAttribute('src','http://placekitten.com/'+d[i].width+'/'+d[i].height)};}())
答
封端的图像是那些其中img
具有指定的srcset。
铬和Firefox积极阻断混合内容当img
具有srcset
。 src
这里是一个http资源,而srcset
使用https。
Chromium Issue 402792 - Mixed content: <img>
with empty srcset attribute should be active content
Mozilla Bug 1055750 - (srcset-mixed-content) Block mixed content <img srcset>
and <picture>
奇怪,它看起来像Chrome可让第一个经过,但阻挡休息。它可能应该阻止所有这些。 –
@ this.lau_不是这样。查看新的截图。 – AndreKR
有什么方法可以复制这个问题吗?如何在维基百科主页上插入placekitten图像?作为一种修复方式,他们可以使用像“//placekiten.com/51/30”这样的协议相关URL插入,但这仍然无法解释为什么Chrome与警告和错误不一致。 –