Please disable Adblock!

Detect your iPad users

This post gives you a short JavaScript function to detect your iPad users. Without any further ado, a javascript code to detect iPad users:

function isiPad(){
   
return(navigator.platform.indexOf("iPad")!=-1);
}

You can also detect browser version and some other stuff by parsing user agent string. Here is an iPad Safari's user agent string for your reference:

Mozilla/5.0(iPad; U; CPU OS 3_2 like Mac OS X; en-us) 
AppleWebKit/531.21.10(KHTML, like Gecko) Version/4.0.4
Mobile/7B334bSafari/531.21.10

Recently a friend of mine got himself an iPad and I couldn't not notice how his internet browsing device preferences are changing (PC & iPad). More and more people are using hand held devices namely iPad to browse the internet. So it's about time to show your iPad visitors some love and display your website designed specifically for iPad.

Detect your iPhone users

This post gives you a short JavaScript function to detect your iPhone users. Without any further ado, a javascript code to detect iPhone users:

function isiPhone(){
   
return(navigator.platform.indexOf("iPhone")!=-1);
}

You can also detect browser version and some other stuff by parsing user agent string. Here is an iPhone Safari's user agent string for your reference:

Mozilla/5.0(iPhone; U; CPU OS 3_2 like Mac OS X; en-us) 
AppleWebKit/531.21.10(KHTML, like Gecko) Version/4.0.4
Mobile/7B334bSafari/531.21.10

Recently a friend of mine got himself an iPhone and I couldn't not notice how his internet browsing device preferences are changing (PC & iPhone). More and more people are using hand held devices namely iPhone to browse the internet. So it's about time to show your iPhone visitors some love and display your website designed specifically for iPhone.

Web Hosting By Arvixe