homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Google / Google AdSense
Forum Library, Charter, Moderators: incrediBILL & jatar k & martinibuster

Google AdSense Forum

polyglot html5 & adsense
document.write mess

 10:36 pm on Jan 26, 2013 (gmt 0)

polyglot html5 is to be served as xml (it's xhtml5 that's also HTML5 at the same time).

No problem there till you get to adsense ... the javascript seems to use document.write which is not supported by browsers when they get it served as xml.

Now there is a workaround, essentially it's adding an object in the xml and tellign it to load a separate file (much like an iframe does) as html (not as xml) and let that one load the adsense stuff.

I've been trying to get adsense support to
1. tell me that they do not have a version that does not use the obsolete document.write anymore - they have better programmers than this
2. to give their blessing on using the kludge with the object ... if they do not have it

no luck so far in getting a non canned response.

Anybody alse got through to those that do understand this at the 'plex ?

polyglot html: [webmasterworld.com...]
using an object to include adsense: [robjinman.com...]

Thoughts ? Experience ?

[I'm not interested the xhtml vs HTML discussion]



 11:03 pm on Jan 26, 2013 (gmt 0)

No experience with xhtml, but did you try DFP?


 11:13 pm on Jan 26, 2013 (gmt 0)

I would ask the question on an XHTML forum. Presumably one exists somewhere on WebmasterWorld.


 11:09 am on Jan 28, 2013 (gmt 0)

While it's old - pre html5 this reference has something to say - esp read till the bottom where he points out problems with MSIE (of course "that" browser has to mess things up again).


Why can't Google engineers just learn to program without document.write() ... innerHTML guys ... And why can't adsense support work like they should ... actually answer things and be knowledgeable about their own crap.

in the end it seems like it's not going to happen. I'll probably end up serving the content as html ... which is against the standards ... thanks Google , thanks Microsoft ... I will remember.

Or maybe use the included object if the browser understands xml and use the normal code if the browser only supports html and no xml -IE does that-. But it means all pages have to be server side scripted ... which they have no need to be for any other reason in most cases.


 9:35 am on Jan 29, 2013 (gmt 0)

Got an answer back from adsense support that they escalated it to their technical staff - there's hope yet they'll fix it - and they recommend I use the workaround till they fix it.

Seems like there's light at the end of the tunnel after all.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Google / Google AdSense
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved