Cooking with Webstandards! Taste the full flavour of the Web

T.I.D.U. - Google AdSense Display

T.I.D.U.: Things I don't understand

To be honest, I am not a big fan of all those AdSense littered blogs, but I thought contributing to Andy Budd's great BlogAid project would be a good idea. So I applied for AdSense and was quickly approved. Generated my bit of code, implemented it on this page's homepage and....nothing happened.

To be honest, I really feel quite stupid I can't figure out what's wrong here, but then I decided not to waste any more time with it and instead ask you!

I suspect that some kind of script blocking is at work here cause i clearly can see in my statusbar that a connection to google is made each time the page is loaded (and the AdSense Report does indicate it as well). To my big surprise the Ad is displayed by Internet Explorer on Win and Safari on Mac, but not in Mozilla, Firefox or Opera. Leaves me a bit puzzled and I thought it could be a local problem and had others to have a look at it....but with quite the same results. So any hints would be highly appreciated.

Screenshot of AdSense display in IE and Mozilla

Posted by Minz Meyer at January 14, 2005, 03:55 PM | To Top

Other ingredients

The problem is that you serve your homepage (which contains the adsense code) as aplication/xhtml+xml, which breaks the javascript code.

XML documents behave different than HTML documents, and need other scripting. For example, the statement document.write does not work in XML. I have contacted Google about it in september 2003, (see, but so far they have not solved the problem.

Posted by: Jeroen at January 14, 2005 05:57 PM | Let Cool (this ingredient)

Maybe this will help for the adsense problem:
(haven't used it, no ads for me).

Posted by: Philippe at January 15, 2005 01:50 AM | Let Cool (this ingredient)

Jeroen and Philippe,
thanks for your input. That's it, I should have asked you in the first place :))

I'll try to incorporate the solution suggested by Philippe's link. We'll see if it works.

Posted by: Minz Meyer at January 17, 2005 01:40 PM | Let Cool (this ingredient)

Yeah! It worked, well done people!

Posted by: Christine at January 19, 2005 11:41 PM | Let Cool (this ingredient)

I'm the guy who wrote the Keystone Websites script. I'm glad that it was helpful to you.

Posted by: Simon Jessey at February 2, 2005 06:55 PM | Let Cool (this ingredient)