One thing I learned right away was that AdSense for Mobile ads don’t show up on non-mobile devices and currently it only shows up on iPhones and Android phones as best as I can tell. The iPad is not currently treated as a “mobile” device by AdSense Mobile. So I needed a way to display mobile ads to iPhones and Android phones and a way to display regular AdSense ads to all other devices. I found this site to detect mobile devices. The actual PHP code can be found here: mdetect.php

With that code included onto my PHP pages I was able to quickly determine if an incoming request was from and iPhone or an Android phone like so:

Another thing to note is with JQuery Mobile its easy to put all your content into one webpage – that way all the transition effects like sliding, etc. work flawlessly however this also presents a problem in the fact you can currently only have a maximum of 3 ads per page so even though you might only be displaying a portion of your content which may or may not have an ad visible you need to ensure you don’t go over the 3 ad limit even if they are currently hidden (unless of course you code it so the JQuery Mobile page manually loads the ad when it’s visible). This does pose a problem with some JQuery Mobile projects so be aware of this. You can avoid this issue by simply loading a page and having rel=”external” in your href so the default Jquery Mobile AJAX page loading isn’t used but you will lose the transition effects from page-to-page.