【问题标题】:How to stop Adsense loading mixed content on https site?如何阻止 Adsense 在 https 网站上加载混合内容?
【发布时间】:2017-06-27 13:13:17
【问题描述】:

我的 https 网站出现间歇性混合内容错误。网站链接是stakeholdermap.com

我已经检查了 Chrome 开发工具 >Network 选项卡,我在下面看到了不安全的 url 示例:

Mixed Content: The page at 'https://www.stakeholdermap.com/stakeholder-analysis.html' was loaded over HTTPS, but requested an insecure plugin data 'http://static.vertamedia.com/static/vpaid-ssp-vast.swf?aid=41476&sid=0&cb=146233.42079096.743365'. This content should also be served over HTTPS. ads?client=ca-pub-3370240294319443&format=300x250&output=html&h=250&slotname=8722343817&adk=5159607…

Mixed Content: The page at 'https://www.stakeholdermap.com/stakeholder-analysis.html' was loaded over HTTPS, but requested an insecure plugin data 'http://ads2.vertamedia.com/vast/vpaid-config/?width=300&height=250&aid=4147…takeholdermap.com&v=2.2.90&t=flash&video_duration=&cb=73026784276589750000'. This content should also be served over HTTPS.

但广告位使用的是最新代码 (//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js)

我很确定这些是 Adsense 加载的。我的问题是如何阻止或强制它使用 https?

【问题讨论】:

    标签: https adsense


    【解决方案1】:

    如果可能,请让用户浏览器获取安全内容: <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" /> 如果该广告可通过 https 访问,那么它将获取该版本,否则,该内容将被阻止并在其位置显示另一个内容。将元数据放在所有其他元标记所在页面的<head> 部分。

    您可以在这里找到更多信息:https://developers.google.com/web/fundamentals/security/prevent-mixed-content/fixing-mixed-content

    【讨论】:

      猜你喜欢
      • 2018-05-18
      • 2015-10-11
      • 2014-01-03
      • 1970-01-01
      • 2012-01-17
      • 1970-01-01
      • 2011-05-11
      • 2017-01-23
      • 1970-01-01
      相关资源
      最近更新 更多