IE Mobile Browser Definition File v2.0

You Can Take it With You

Syndication

News

  • Don't miss the next Windows Mobile Webcast... Unit Testing for Mobile Devices: http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032382824&EventCategory=4&culture=en-US&CountryCode=US.

Yesterday's post provided the *.browser file information necessary for ASP.NET AJAX to recognize that IE Mobile 6.12 (the Windows Mobile 6 version of IE Mobile) provides support for some basic ASP.NET AJAX features. Because the goal of that *.browser file information was specifically to enable ASP.NET AJAX support, I didn't worry about setting any of the other IE Mobile capabilities.

I decided to spend some time today working out the remaining capabilities as best I could. My source for these additional capabilities are primarily the IE Mobile 6.12 Browser Standards list, the Summary of Mobile Browser Features, and experimentation. Those capabilities that I couldn't resolve through these sources are set to the same value that was reported under Pocket IE 4; the capability values where I did this are annotated with a comment "from PIE4"at the end of the line. I couldn't find any information on IE Mobile 6.12's preferred rendering format so I made the assumption that it is XHTML Basic which may or may not be correct; the capabilities that this assumption affects have an "assumption" comment at the end of the line.

I believe that the *.browser file capability values are correct and represent most of the possible IE Mobile 6.12 capabilities but I have not exhaustively tested every possible scenario. You need to test and verify the browser definition file's behavior for your specific application. All of the disclaimers I included in yesterday's post still remain true.

I'll still need to test the behavior of Visual Studio 2008 ASP.NET AJAX with this *.browser file information. As I mentioned in yesterday's post, I'll test it out once I get my VS2008 test machine put back together into a reasonable representation of reality. J

Here's the updated browser definition file information.

<!--

    Browser capabilities information that enables Visual Studio 2005

    ASP.NET AJAX to recognize IE Mobile 6.12 (version on Windows Mobile 6)

-->

<browsers>
    <browser id="IEMobile" parentID="WinCE">
        <identification>
            <userAgent match="IEMobile (?'version'\d+\.\d+)" />
        </identification>
        <capture>
            <userAgent match="MSIE (?'msieMajorVersion'\d+)" />
            <header name="UA-PIXELS" match="(?'screenWidth'\d+)x(?'screenHeight'\d+)" />
        </capture>
        <capabilities>
            <capability name="breaksOnInlineElements"                  value="false" />                <!-- from PIE4 -->
            <capability name="browser"                                 value="IEMobile" />
            <capability name="cdf"                                     value="true" />
            <capability name="defaultScreenPixelsHeight"               value="${screenHeight}" />
            <capability name="defaultScreenPixelsWidth"                value="${screenWidth}" />
            <capability name="ecmascriptversion"                       value="1.2" />
            <capability name="javaapplets"                             value="true" />
            <capability name="jscriptversion"                          value="5.6" />
            <capability name="maximumRenderedPageSize"                 value="800000" />                <!-- from PIE4 -->
            <capability name="msdomversion"                            value="3.0" />
            <capability name="numberOfSoftkeys"                        value="2" />
            <capability name="requiresAbsolutePostbackUrl"             value="false" />                 <!-- from PIE4 -->
            <capability name="requiresCommentInStyleElement"           value="false" />                 <!-- from PIE4 -->
            <capability name="requiresHiddenFieldValues"               value="false" />                 <!-- from PIE4 -->
            <capability name="requiresOnEnterForwardForCheckboxLists"  value="false" />                 <!-- from PIE4 -->
            <capability name="requiresXhtmlCssSuppression"             value="false" />                 <!-- from PIE4 -->
            <capability name="preferredImageMime"                      value="image/jpg" />             <!-- from PIE4 -->
            <capability name="preferredRenderingMime"                  value="application/xhtml+xml" /> <!-- assumption -->
            <capability name="preferredRenderingType"                  value="xhtml-basic" />           <!-- assumption -->
            <capability name="screenPixelsHeight"                      value="${screenHeight}" />
            <capability name="screenPixelsWidth"                       value="${screenWidth}" />
            <capability name="supportsBodyClassAttribute"              value="true" />                  <!-- from PIE4 -->
            <capability name="supportsCallback"                        value="true" />
            <capability name="supportsDivNoWrap"                       value="false" />                 <!-- from PIE4 -->
            <capability name="supportsNoWrapStyle"                     value="false" />                 <!-- from PIE4 -->
            <capability name="supportsSelectFollowingTable"            value="true" />                  <!-- from PIE4 -->
            <capability name="supportsStyleElement"                    value="true" />                  <!-- from PIE4 -->
            <capability name="supportsTitleElement"                    value="false" />
            <capability name="supportsUrlAttributeEncoding"            value="true" />                  <!-- from PIE4 -->
            <capability name="supportsXmlHttp"                         value="true" />
            <capability name="tagwriter"                               value="System.Web.UI.HtmlTextWriter" />
            <capability name="type"                                    value="MSIE ${msieMajorVersion}" />
            <capability name="vbscript"                                value="true" />
            <capability name="version"                                 value="${version}" />
            <capability name="w3cdomversion"                           value="1.0" />
            <capability name="win32"                                   value="true" />
            <capability name="xml"                                     value="true" />
        </capabilities>
    </browser>

    <!--
    **************************************************************
    Exclude IE Mobile Version On Late Releases of Windows Mobile 5
    **************************************************************
    WM5 AKU3.3 and later shipped with a version of IE Mobile that sends the new user agent string
    that includes the text "IEMobile", but does not provide the features necessary to work with
    ASP.NET AJAX so set capabilities appropriatly so that the ASP.NET server will render the page
    without the inclusion of AJAX features.
    -->
    <browser id="IEMobileNotAspNetAjaxCapable" parentID="IEMobile">
        <identification>
            <capability name="version" match="6\.8" />
        </identification>
        <capabilities>
            <capability name="supportsCallback"                        value="false" />
            <capability name="w3cdomversion"                           value="0.0" />
        </capabilities>
    </browser>

    <!--

    ************************
    Screen Color information
    ************************
    UA-COLOR Header
    Set isColor capability to true and set the screenBitDepth based on the header value
    Example UA-COLOR=color32 -> screenBitDepth=32, UA-COLOR=color16 -> screenBitDepth=16, etc.
    -->

    <gateway id="IEMobileColorScreenBitDepth" parentID="IEMobile">
        <identification>
            <header name="UA-COLOR" match="color(?'bitDepth'\d+)" />
        </identification>
        <capabilities>
            <capability name="screenBitDepth"                          value="${bitDepth}" />
            <capability name="isColor"                                 value="true" />
        </capabilities>
    </gateway> 

    <!--
    ************************
    Pocket PC Input Type
    ************************
    -->
    <gateway id="IEMobilePPC" parentID="IEMobile">
        <identification>
            <header name="UA-OS" match="Pocket PC" />
        </identification>
        <capabilities>
            <capability name="inputType"                               value="virtualKeyboard" />
        </capabilities>
    </gateway> 

    <!--
    ************************
    File Upload Capabilities
    ************************
    Upload is only supported on Windows Mobile 6 Professional
    No header available that identifies a device as Professional vs. Classic so must infer
    through the combination of "Pocket PC" appearing in the UA-OS header and the device's ability
    to initiate a voice call (capability is set by the UA-VOICE handling in gateway.browser).
    This is not 100% reliable due to the fact that the voice capability may report
    false when the device has the phone turned off,
    -->
    <gateway id="IEMobileUploadSupport" parentID="IEMobile">
        <identification>
            <header name="UA-OS" match="Pocket PC" />
            <capability name="canInitiateVoiceCall" match="true"/>
        </identification>
        <capabilities>
            <capability name="supportsFileUpload"   value="true" />
        </capabilities>
    </gateway>

</browsers>

The steps to add the browser definition information to your project are the same as in yesterday's post. I'll repeat them here...

  1. On the Visual Studio menu, select Website then select Add New Item...
  2. Select the Browser File template
  3. Name the file appropriately, I use IEMobile.browser
  4. Click OK
  5. A prompt is displayed asking if the browser file "... should be placed inside the 'App_Browsers' folder", click Yes
  6. Delete the contents of the new browser file and replace with the IE browser definition information above.

I believe that this browser definition information provides a reasonably accurate representation of IE Mobile 6.12 capabilities; time will tell. If you find any errors, improvements, or additions let me know and I'll update the information accordingly,

Just to mention this again, please test out the browser file in your specific application to confirm it's appropriateness for your situation.


Posted Oct 23 2007, 02:08 PM by jim-wilson

Comments

Peter Hellstrom wrote AJAX support in Sharepoint Mobile sites?
on 11-13-2007 12:02 AM
Hi Jim,

I would appreciate on how to approach implementing AJAX in a Mobile sharepoint site, starting on the level of "do it", or "don´t go there".

I have tried to drain the SharePoint team for information on AJAX / Silverlight support in SharePoint SP1, but got no good answers so far.

Gotta say I have one of your pluralsight tee´s since last VSLive! conference, so that and Steve Hegenderfers blog made me check out your blogs. I believe everyone but me is in Barcelona (saw Fritz was going too), but if you have some pointers on this issue it would be great.

/ Peter @ Zipper, Managed Infrastructure & Enterprise Mobility, at TechEd D13 on CCIB
Zach Baker wrote Anyone seen .browser file for Palm Treos?
on 04-28-2008 10:39 AM
Good work.

These things are a pain. I was wondering if anyone has made a WORKING .browser file for Palm Treos. They use Blazer 4.x.

This guy gets it close, but no cigar. Still recognized as IE6to9, which is default. Should be the parent perhaps, but not the leaf.

http://geekswithblogs.net/SometimesBlogger/archive/2007/08/16/114714.aspx
Jim Wilson wrote re: IE Mobile Browser Definition File v2.0
on 04-28-2008 11:23 AM
Zach;

Can you point me to where I can find an emulator for the Palm edition you're targeting?

With that, I can probably work through the capabilities hierarchy and develop a correct .browser definition.

-Jim

Add a Comment

(required)  
(optional)
(required)  
Remember Me?