×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    11

    recognzing browsers

    Hi,
    first I'm sorry if someone else already asked (and answered) for this: I tried to search for the anwser in the previous topics of this Forum but I didn't find anything :-(

    Here is my problem:
    how can I recognize if a browser accept wap2.0 pages?

    With WAP1.x I write this piece of code (php):
    if ( strstr( $_SERVER["HTTP_ACCEPT"], "wml" ) ) { ...

    ...but if I say:

    if ( strstr( $_SERVER["HTTP_ACCEPT"], "application/xhtml+xml" ) ) { ...

    it won't work!
    What can I do?

    Thanks in advance for your help.

    Filippo

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003
    Posts
    140

    RE: recognzing browsers

    Hi!

    I suppose you have tried simply "xhtml"?

    There are also other ways to identify the browsers and what they support. For Nokia devices you can either use the User Agent name in the HTTP header (for that you need to know which phones support XHTML), or you could use UAProf that all currently available Nokia phones wiht XHTML support. For more information about UAProf, please see www.openmobilealliance.org and WAP specifications.

    sannah/Forum Nokia Developer Support

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

    RE: recognzing browsers

    Hi Sannah, thanks for your help!

    Yes: I tried also "xhtml".

    Looking for the UAProf doesn't help. It makes things even more complicated!
    For istance if you take a look at S.E. T68 (http://wap.sonyericssonmobile.com/UAprof/T68R201.xml) you see "application/vnd.wap.xhtml+xml" in the list items of CcppAccept prf.
    But T68 is NOT wap2.0 (and it doesn't read xhtml pages) :-(

    I had a look at OMA documents. Here is something helpfull:

    "A conforming user agent MUST meet all the user agent conformance requirements defined in [XHTMLMod].
    The MIME media type for XHTML Mobile Profile is ?application/vnd.wap.xhtml+xml?.
    A conforming user agent MUST accept XHTML Mobile Profile documents identified as
    ?application/vnd.wap.xhtml+xml?.
    A conforming user agent SHOULD accept XHTML Mobile Profile documents
    identified as ?application/xhtml+xml?.
    When declaring support for XHTML Mobile Profile, a conforming user agent MUST use an Accept header with value
    application/xhtml+xml; profile="http://www.wapforum.org/xhtml" and an Accept header
    with value application/vnd.wap.xhtml+xml.
    Additional user agent conformance requirements are defined in [WAE]."

    So, maybe my problem was related to something else.

    In Openwave docs I found this:

    "List of Openwave? SDK 5.1 Known Bugs

    Openwave Mobile Browser 6.0 does not accept HTML Mobile Profile documents identified with the MIME type "application/ vnd.wap.xhtml+xml" or "application/xhtml+xml". If a document is identified with either of these MIME types, the browser will display a "Content not supported" error. Currently, the only MIME type supported for XHTML Mobile Profile documents is "text/html". The other MIME types will be supported in future releases of Openwave Mobile Browser 6.x."

    Even if I'm not using Openwave sdk, maybe I had sort of the same bug.

    Can you please post a list of Nokia wap2.0 handsets?
    Also, if you have one of theese mobile phone, can you please go to URL
    http://wap.portel.it/ua.asp?sannah
    ...so that I can see all your accept header?

    Thank you very much

    Kindest regards
    Filippo

Posting Permissions

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