-
Notifications
You must be signed in to change notification settings - Fork 300
Google adsense
Frug edited this page Oct 18, 2012
·
1 revision
AJAX Chat serves its page content with content-type application/xhtml+xml (if the browser can handle it, e.g. not Internet Explorer), but the Google Adsense script doesn't work on real XHTML pages served with content-type application/xhtml+xml.
The solution is to serve the Google Ads in another page with content-type text/html and include it as an object element.
You cannot use an iframe as iframes don't exist in XHTML strict.
The guide Making AdSense work with XHTML explains all you need to make it work.
As an alternative, you could as well force AJAX Chat to use a text/html content-type by editing lib/config.php:
// The content-type of the XHTML page (e.g. "text/html", will be set dependent on browser capabilities if set to null): $config['contentType'] = 'text/html';