Monday, May 24, 2010

document.write()...do not want

So checking my email this morning I noticed a broken ad displaying.

I usually notice the ads on the page more now than I notice the actual content. I work in advertising and it seems my brain has made this switch without my knowledge or consent.

Now not only is this ad not displaying properly but it is using an outdated way of displaying. These two factors drive me crazy, especially when being used by large online entities such as Hotmail or Google...yes, Google uses this method still.

Now the first part of this problem makes me mental as an ad guy for obvious reasons. A large organization serving broken ads for an extended period of time... this should have been caught and fixed a long time ago. Let’s give them the benefit of the doubt for the time being though. Let’s say that this ad is served by an affiliate network and only displays occasionally and in rotation with many other advertisers which would make the issue much more difficult to troubleshoot. This places the onus of QAing these ads back on the organizations that are providing the tags in the first place, the affiliate networks.

I have worked with a number of affiliate networks in my time and not one of them has proper checks and balances to catch these sorts of problems and for the most part they don't seem to care. This means extra diligence and headaches for publishers...yay.

Now the second part of this whole document.write issue is why is it still being used at all? It is a dirty way of inserting content to be sure and has a few known issues:

- content being added using document.write may not appear in the page’s DOM so no access to accessibility APIs

- document.write does not work properly in XHTML when pages are served as XML

Now a nice fix for this was proposed over at Sitepoint by James Edwards.

However, the boat was missed slightly when we talk about who is to blame for this issue. It most definitely is not the publisher (site) for the most part. Usually you have to look no further than the affiliate networks. There seems to be little to no regard for the ads that they load up or allow their clients to load into their network and distribute far and wide across the web.

So if they don't care, how do we make them care? Well I suppose it shouldn't come as a surprise that advertising is driven by revenue. So let’s hit them in their pocket books. If every publisher that experiences a problem with their ads stands up and says we will not run your advertisements until you deal with these problems we might get somewhere. Ya... when pigs fly this will happen. Even the very thought of losing revenue is a big no no in advertising. So where does that leave us? Back at square one...with broken ads.

A couple more interesting articles about document.write() can be found at:


Why document.write() doesn't work in XML
Accessibility1
Accessibility2
Accessibility3
Accessibility4