Javascript errors from Google Adsense

Google have messed up their script. There’s not much you can do about it.

For some reason http://pagead2.googlesyndication.net/pagead/expansion_embed.js, included in the parent page by the AdSense scripts, is trying to send information about the advert into a newly-written <iframe> created to hold the advert, using the new HTML5 postMessage facility:

            ha(this, function (f, e) {
                d[Pa](this.a[A]+"|"+f+":"+e, this.la)
            });

Yeah. Some nice minified/obfuscated code there. Trust me, Pa is 'postMessage'!

The targetOrigin argument in this call, this.la is set to http://googleads.g.doubleclick.net. However, the new iframe was written with its src set to about:blank. This doesn’t match the target origin, so the browser must refuse to send the message. Only Chrome seems to be dropping an actual whinge to the console log about it though.

No idea why it’s doing this at all, never mind why it’s not just using '*' as a target origin… I’m not really feeling like wading into the obfuscated script to find out. However, this error should not cause page loading to slow down. If you’re seeing pauses it’s usually resolving and fetching other external scripts.

Leave a Comment