Response title
This is preview!
Is there a way of knowing if a jQuery mobile page has been loaded directly (regular http call) or though ajax in order to load Adsense?
Basically, Google Adsense cannot be loaded in pages that are loaded via ajax because it throws the error message:
Failed to execute 'write' on 'Document': It isn't possible to write into a document from an asynchronously-loaded external script unless it is explicitly opened.
So the solution is to only display the Google Adsense banner if it is a regular http request. For that, I'm using this method:
© 2013 jQuery Foundation
Sponsored by and others.