locked
Request.UserAgent values RRS feed

  • Question

  • User-1792277821 posted

    I'm building a mobile expansion on my company website that will redirect users to a mobile version of the site at login if my code detects if they're using a mobile device. I've tried using things like Request.IsMobileDevice (which sounded too good to ge true to begin with) but it doesn't seem to work at all. So after looking through some of my browser detection options, I've decided to reference Request.UserAgent to find out what people are using.

    So I'm using this for mobile detection:

    If Not Request.UserAgent.Contains("Win") Or Request.UserAgent.Contains("IEMobile") Then
                    'perform login functions
                    Response.Redirect("Mobile/default.aspx")
    End If

    I've looked up what the UserAgent value is for Windows Phone 7, which is why I'm checking for "IEMobile", but I'm not sure if this will be solid enough."> Could someone let me know what the Request.UserAgent values are for some of the major mobile browsers (IPhone, Android, Blackberry, etc.)?
    If someone would happen to know what it is for Apple users against Safari and Firefox would be great too.
    Thanks much!

    Thursday, February 3, 2011 2:33 PM

Answers

  • User533502567 posted

    I've looked up what the UserAgent value is for Windows Phone 7, which is why I'm checking for "IEMobile", but I'm not sure if this will be solid enough."> Could someone let me know what the Request.UserAgent values are for some of the major mobile browsers (IPhone, Android, Blackberry, etc.)?
     

    Here is a list of mobile user Agents..

    http://www.zytrax.com/tech/web/mobile_ids.html

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 3, 2011 3:00 PM

All replies