Wrangling with Google AdSense

For the past couple of days, I’ve been trying to tame Google’s AdSense adverts on my site. I decided a few months ago to gradually introduce a few non-intrusive Google adverts to the site as a precursor to a course I’ll be doing at university during the summer.

I’m a bit of a standards freak, and I serve all the pages on this site as proper XHTML with the correct MIME type of application/xhtml+xml (except for Internet Explorer, but that’s a whole different ball game). However, lo-and-behold, Google’s adverts don’t work with pages served like this, since they use some outdated JavaScript techniques to inject the adverts into the page.

I searched up and down (ironically using Google’s web search) to find a solution to this problem. The best I’ve found so far is to include the adverts on a separate page marked up as regular HTML and served as text/html, and then include this in your (valid) page using an <object> tag. It seems a little backwards, but it does the trick well enough.

Don’t you think it’s time that Google joined the 21st century and supported valid markup?