AdSense and AJAX: Not a happy combination

Tuesday, April 1st, 2008

After releasing my AjaxBerlee WordPress theme George and Milan’Che
reported problems with Google’s AdSense. This left me with a problem.
Because new page requests in my theme are parsed over the old ones.

AdSense works as follows. The Mediapartners-Google spider indexes the site,
when visitor now requests one of your pages it will load the external
JavaScript from the Google domain. In that JavaScript the text advertise is
displayed.

So far so good. An AJAXified page will initially display the AdSense
advertise very well (because the pages are backwards compatible). The
visitor clicks on a link and now only a part of the page get reloaded, but
not the AdSense advertise. Because it’s possible to load an JavaScript
into JavaScript, but its not possible to reload JavaScript into JavaScript
(for scripts that aren’t build for it).

(more…)

Want to subscribe?

 Subscribe in a reader Or, subscribe via email:
Enter your email address:  
Find entries :