Welcome to WebmasterWorld Guest from 54.162.240.235

Forum Moderators: incrediBILL & martinibuster

Message Too Old, No Replies

polyglot html5 & adsense

document.write mess

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

WebmasterWorld Senior Member swa66 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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 ?

Ref:
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)

10+ Year Member



No experience with xhtml, but did you try DFP?
11:13 pm on Jan 26, 2013 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I would ask the question on an XHTML forum. Presumably one exists somewhere on WebmasterWorld.
11:09 am on Jan 28, 2013 (gmt 0)

WebmasterWorld Senior Member swa66 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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).

[cromwell-intl.com...]

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)

WebmasterWorld Senior Member swa66 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month