BrowserHawk IQ now available! Click here for the full scoop!
Search:
What is the best way to detect mobile devices?
Created: 4/15/2009    Updated: 4/15/2009
Q   I would like to know if a browser hitting my site is running on a mobile device. What is the best way to detect this?

A   Use logic like this (pseudo-code):

if bh.WAP = True OR bh.PDA = True OR (Browser = Safari AND (bh.OSDetails = "iPhone" OR bh.OSDetails = "iTouch")) then
... this is a mobile device ...
else
... this is not a mobile device ...
end if

    FAQ Home  |  Search FAQ  |  Show New Items  |  Ask a FAQ  |  Notify Me  |  Most Popular     
 
 
Copyright © 1994-2020 cyScape, Inc. All Rights Reserved. ()
ASP, ASP.NET, ColdFusion MX, CFMX, JSP, PHP