OpenX谷歌广告在Chrome中导致javascript错误

OpenX谷歌广告在Chrome中导致javascript错误,javascript,google-chrome,iframe,adsense,openx,Javascript,Google Chrome,Iframe,Adsense,Openx,在我们的网站上,我们通过OpenX在一些页面上提供谷歌广告。在这些页面中,此错误出现在Google Chrome浏览器控制台中。在加载页面时,它会出现很多次 错误的形式是 Blocked a frame with origin "http://ox-d.<openxdomain>.com" from accessing a frame with origin "http://real website domain". Protocols, domains, and ports mus

在我们的网站上,我们通过OpenX在一些页面上提供谷歌广告。在这些页面中,此错误出现在Google Chrome浏览器控制台中。在加载页面时,它会出现很多次

错误的形式是

Blocked a frame with origin "http://ox-d.<openxdomain>.com" from accessing a frame with origin "http://real website domain". Protocols, domains, and ports must match. 
阻止了具有原点的帧”http://ox-d..com“从访问具有原点的帧”http://real 网站域名”。协议、域和端口必须匹配。
此错误不会出现在任何没有Googles的页面中。(其他页面上的OpenX横幅不提供谷歌广告。这不会导致此问题。)所有OpenX横幅都是iFrame

发生这种情况是因为我们网站的问题吗?或者这是OpenX/GoogleAds/Google Chrome的问题


感谢

之所以出现这种情况,是因为谷歌浏览器比其他浏览器具有更强的跨域安全性

首先,检查
iframe
标记。它应该以
结尾,而不仅仅是
/>
然后,您应该尝试从iframe src属性中删除协议方案(
http[s]:

例如:

最后,您应该“授予”访问权限

http://real 网站域

通过设置

Access-Control-Allow-Origin: real.website.domain
Access-Control-Allow-Headers: X-Requested-With, Content-Type

如果您的OpenX安装在其他域中,那么有时google不允许在iframe中放置他们的广告代码

请尝试GoogleAds的javascript调用代码类型,这应该可以正常工作。检查并把你的评论放在这里