×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Sep 2003
    Posts
    6

    Xhtml Support detection

    Hi All

    Is there any way(I mean any Header information) where we can know ,whether the Users mobile supports Xhtml .

    For example, When a user access a url, i need to know, whether his mobile phone supports xhtml, if yes, i want to redirect him to an Xhtml site ,else i will redirect him to an exisisting wml site.
    (Currently , i am using a global constant which contains all the mobile phone models as comma seperated and i am checking this with the http_user-agent. )

    Are there any specific headers where we can know, if the user mobile supports xhtml or not.

    Please help.
    Sudheer

  2. #2
    Registered User
    Join Date
    Mar 2003
    Location
    Warsaw, PL
    Posts
    4
    Check browser's Accept content for:

    application/vnd.wap.html+xml

    application/vnd.wap.xhtml+xml

    application/xhtml+xml
    or
    application/xhtml+xml; profile="http://www.wapforum.org/xhtml"

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    20

    How does one do that?

    Hi there,

    I had the same question but I'm a complete newbie... so how exactly do you test to see what a browser can accept?

    thanks in advance

    Rich

  4. #4
    Registered User
    Join Date
    Sep 2003
    Posts
    6

    Xhtml /Wml detection

    Hi Rich.

    You can know the entire browser information by looping thru, ServerVariables collection.To exactly know the Phone Model
    U need to request for a servervariable called Http_User_agent

    This Piece of code will exactly return the phone model
    =======================================
    lstrUA=Request.ServerVariables("HTTP_USER_AGENT")
    lintSlashPos = InStr(1, lstrUA, "/")
    lstrPhoneModel=Mid(lstrUA, 1, lintSlashPos - 1)
    ======================================

    This Piece of code will return the mobile number which requested the page
    =======================================
    lstrMSISDNThru = Request.ServerVariables("http_x_up_calling_line_id")
    =======================================

    But when i tested with Nokia3650 Mobile, I am not able to get the required browser information(i.e the screen resolution of the mobile,Xhtml/Wml Support etc).

    So i followed a little bit lengthy process to get the above information which was required for my current project.

    There is a concept called as UAPROF profiles.Its an xml file which contain most of the details of a particular model.
    U can check the UAPROF here(http://w3development.de/rdf/uaprof_repository/ , and can download them under REAL WORLD PROFILES section)
    So when a user lands on a Page, i get the phone model from HTTP_USER_AGENT header and call the related xml file and get the screen size and wap browser version of that particular mobile.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •