Adsense 在 FireFox 中不显示
当我在 FireFox 中测试我的页面时,我遇到了一些非常奇怪的事情。 Adsense 块在 Firefox 中被注释掉(绿色)。
然而,当我将所有渲染的代码粘贴到同一项目的空白 aspx 页面中而不使用母版页时,它确实会正确渲染。
http://picpaste.com/problem.jpg
这是问题的图片。正如您在其中一页上看到的,脚本代码是绿色的。这怎么可能?
I came accross something very strange when i was testing my pages in FireFox.
The Adsense blocks are commented out (green) in firefox.
It does render however properly when i paste all the rendered code in a blank aspx page in the same project without using masterpage.
http://picpaste.com/problem.jpg
Here's a picture of the problem. As you can see on one of the pages the script code is green. How is that possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
无法正常工作的版本被定义为 XHTML。这意味着
您可以删除注释标记,因为不需要它,并且您应该将脚本标记的内容放在 CDATA 块中:
The version that doesn't work correctly is defined as XHTML. This means that
<!--
will always open a comment, even inside a script tag.You can remove the comment tag as it isn't needed, and you should put the contents of the script tag in a CDATA block:
解决了。该页面作为 application/xhtml+xml 发送,必须是 text/html。尽管没有这样定义,但它确实以该内容类型发送了它。
关于如何让 AdSense 在 Firefox 上使用内容类型 application/xhtml+xml 工作的任何解决方案?
Solved. the page was sent as application/xhtml+xml which has to be text/html. Although not defined as such it did send it with that content-type.
Any solutions on how to get AdSense work on firefox with content-type application/xhtml+xml?