• Resolved mlankton

    (@mlankton)


    I have seen many methods of approaching this after searching Google. The few I’ve tried did not produce the desired result, and the others seemed too arcane for my modest knowledge of xhtml.

    Can anyone point me toward a simple method of using javascript ads when you are properly serving XHTML as application/xhtml+xml that will work and also not violate Google’s terms of usage? If the answer is out there, I’m not finding it.

Viewing 1 replies (of 1 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    There’s no really good way to do this. Blame Google and their use of Document.Write() and iframes.

    A workaround can be found here: http://keystonewebsites.com/articles/adsense.php

    The workaround basically involves creating a separate html document (as html) which contains the adsense code, and then including it into the xhtml page using an <object> element. This should work fine and doesn’t actually violate Google’s terms of service, although Google might not like it in the future, since the page you’re including it into won’t actually contain their javascript unless it’s rendered by a browser.

Viewing 1 replies (of 1 total)

The topic ‘Adsense and proper XHTML’ is closed to new replies.