MobileESP API: JavaScript

Support for client-side JavaScript processing on most phones is very poor to completely non-existent. Generally speaking, JavaScript is probably reliable only for distinguishing between devices in the iPhone Tier. So if you want to know whether your visitor is one of these devices, the JavaScript probably works fine: iPhone, Android, WebOS, and a few others such as Garmin Nuvifone and late-model Symbian S60 devices. And Windows Phone 7, when the devices are launched in late 2010.

As a result, we don’t recommend using the JavaScript for detecting any other mobile device types. This list includes BlackBerry, Windows Mobile (PocketPC and Smartphone), and practically all feature phones. Instead, usage of one of the server-side platforms (PHP, Java, ASP.NET) is recommended to detect for these types of devices.

New! Demo the JavaScript API using your device.

GLOBAL INFO

  • GetUserAgent(): Not supported. Instead, we use a local variable called “uagent”.
  • GetHttpAccept(): Not supported.

DETECTION METHOD RETURN VALUES

All DetectXXX() methods return the booleans TRUE or FALSE (when supported!).

DETECTION METHODS: Platforms and OSes

Assume that all of the following methods probably won’t work. If they work, they probably work only for iPhone Tier devices. Some methods have additional notes.

  • DetectIphone()
  • DetectIpod()
  • DetectIpad()
  • DetectIphoneOrIpod()
  • DetectIos(): A convenience method for catching any iOS device.
  • DetectAndroid(): Detects any Android device: phones, multi-media players, tablets, and Google TV.
  • DetectAndroidPhone(): Includes phones and multi-media players; excludes tablets
  • DetectAndroidTablet()
  • DetectGoogleTV()
  • DetectAndroidWebKit()
  • DetectWebkit()
  • DetectS60OssBrowser()
  • DetectSymbianOS(): Probably won’t work for most Symbian devices. Might work for the newest S60-based devices.
  • DetectWindowsPhone7()
  • DetectWindowsMobile(): Might work for some of the newest devices if the JavaScript is included inline in the HTML.
  • DetectBlackBerry(): JavaScript is almost completely unsupported on BlackBerry 5.xx devices.
  • DetectBlackBerryTablet(): For the PlayBook
  • DetectBlackBerryWebKit()
  • DetectBlackBerryTouch(): Probably won’t work for devices in this group.
  • DetectBlackBerryHigh(): Probably won’t work for devices in this group.
  • DetectBlackBerryLow(): Probably won’t work for devices in this group.
  • DetectPalmOS(): Probably won’t work for this platform.
  • DetectPalmWebOS()
  • DetectWebOSTablet()
  • DetectGarminNuvifone()
  • DetectBrewDevice(): Probably won’t work for devices in this group.
  • DetectDangerHiptop()
  • DetectOperaMobile()
  • DetectOperaAndroidPhone()
  • DetectOperaAndroidTablet()
  • DetectWapWml(): Not supported.
  • DetectKindle()
  • DetectAmazonSilk(): Detects the Android-based Amazon Kindle Fire when the Silk acceleration mode is on.
  • DetectSonyPlaystation()
  • DetectNintendo()
  • DetectXbox()
  • DetectMidpCapable(): Not supported.
  • DetectMaemoTablet()
  • DetectArchos()
  • DetectSonyMylo()

DETECTION METHODS: Classes of Devices

These methods are also poorly supported among mobile devices.

  • DetectSmartphone(): Poorly supported even in this class.
  • DetectMobileQuick(): Very poorly supported.
  • DetectMobileLong(): Very poorly supported.
  • DetectGameConsole(): Rolls all of the gaming consoles up into a single method. Poorly supported.

DETECTION METHODS: Device Tiers

These methods group mobile phones into three broad tiers based on the capabilities of their browsers. See the regular API notes to see a list of devices falling into each tier.

  • DetectTierTablet(): Well supported in this class.
  • DetectTierIphone(): Well supported in this class.
  • DetectTierRichCss(): Poorly supported in this class.
  • DetectTierOtherPhones(): Very poorly supported in this class.
0 comments on “MobileESP API: JavaScript
1 Pings/Trackbacks for "MobileESP API: JavaScript"
  1. [...] Detectar un Iphone o Ipad para que tengas una idea mejor de como trabaja revisa este link [...]