x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 

How to change the Pocket Internet Explorer / Internet Explorer CE User Agent

CESD|200192

Applies To

  • Handheld PC 2000
  • Windows CE .net 4.0, 4.1, 4.2

Overview

Every website you access on your Handheld PC identifies the web browser that you are using through a standardised HTTP header known as the User Agent. The user agent, as well as identifying the specific web browser being used, also identifies the browser version and the operating system which is requesting data from the server. While these variables are not exclusively the only pieces of information being broadcast by the Handheld PC, they often cause users problems due to the legacy nature of their version numbering.

This article discusses how to adjust the version number and operating system information on later Handheld PC and Windows CE core devices to facilitate the correct communication between the Handheld PC and some web services.

More Info

The user agent string can be used as way to control dynamic content being delivered through a web site. For example, although no obvious changes have been introduced to the client browser, when viewing HPC:Factor on a Windows CE device, or on a PC/Mac, the HPC:Factor servers make a differentiated decision over what content to broadcast to the client based upon the reported web browser and operating system is being used.

In the case above, a programmatic choice is made which will allow us to dynamically adjust content in the future based upon whether you are using a H/PC or a full-scale computer system. There are, however, some web sites which already make a programmatic definition over what content should be transmitted to certain types of device. One such example being Microsoft's Windows Live Mail (formerly Hotmail).

Using the example of a HPC2000 device, when a connection is made to the Windows Live Mail server, the Microsoft web service analyses the User Agent transmitted by the HPC as shown below.

Mozilla/4.0 (compatible; MSIE 4.01; Windows NT Windows CE)

Under the Mozilla User Agent (UA) standard, the HPC2000 UA is technically invalid, as it identifies two distinct operating systems as being present in the same request. Microsoft, added the Windows NT string for postive-filtering purposes, assuming (correctly) that the majority of web developers would be unaware of, or, uninterested in Windows CE. However, as Windows NT (meaning Windows NT 4.0) is now depreciated as a platform, the usefulness of this is equally called into question.

Users experience the majority of problems through what can be categorised as Negative Filtering, where-by the web server is instructed to do something different in instances where it detects "Windows CE" as part of the UA. In the case of Windows Live Mail, Microsoft have chosen to ignore the generic nature of the Windows CE name in favour of targeting a small part of the Windows CE lineage - the Pocket PC.

Windows Live Mail automatically assumes that when a "Windows CE" string is detected in the user agent, that a Pocket PC device, enlisting all the standardised Pocket PC platform technologies is making a request. Consequently, the user is redirected to the Windows Live Mobile site. Through a perversion of the User Agent system, in addition to the incompatible browser technologies in operation when rendering the page, the Windows Live Mobile site is itself designed to negatively filter non-Windows CE user agent. The result of the clash of technologies at this point is sufficient to prevent the web page from loading.

A second tier of filtering is also in operation on Windows Live services; Browser Generation filtering. Browser Generation filtering, or simply filtering based upon the standards conformity age of the browser (all be it a discernment based upon a perception of standards) is implemented on a wide ranging number of sites across the Internet. Such filtering is designed to prevent legacy, potentially unsecured browsers from accessing secure sites such as those belonging to on-line banking providers. In the documented instance of HPC2000, Windows CE is identifying the web browser not as a scaled-down version of Internet Explorer, but as the full x86 version of Internet Explorer 4.01 - the ambiguity arises because of the use of an identical UA for both browsers.

It can therefore be seen that any content filtering based upon the rejection of Microsoft Internet Explorer 4 for the PC will automatically apply to any Handheld PC broadcasting this UA, irrespective of the technological capabilities of the browser in supporting the page.

To circumvent this issue, it therefore becomes necessary to adjust the information broadcast through the UA, so that the correct variables are in place to facilitate the automated delivery of the required content.

How-to Guide

WARNING: The steps outlined below will introduce the potential for problems to arise when rending different types of website. The information presented below goes against the established use of User Agent configuration, and may, under a small number of circumstances impact upon the security of any on-line transactions conducted from your Handheld PC. Use of this information is conducted at the sole risk of you, the user.

The Windows CE User Agent is set and configured from with the Windows CE Registry. If you require more information on using the Windows CE Registry see CESDS0006. If you require a Windows CE Registry Editor see CESDS0082.

WARNING: If you use a Registry Editor incorrectly, you may cause serious problems that may require you to hard reset your Handheld PC back to its factory installed configuration. Edit your Windows CE registry at your own risk.

The following information is not applicable to Handheld PC platform releases prior to HPC2000. Pocket Internet Explorer 3.02 from H/PC Professional and Pocket Internet Explorer 2.0 from Handheld PC 2.0 do not support these modifications.

To alter the Pocket Internet Explorer / Internet Explorer CE User Agent

  1. Open your Windows CE Registry Editor
  2. Navigate to:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\User Agent

The User Agent is configured using a string variable sequence, and is initialised at boot time by the Handheld PC as part of the Windows Explorer process. The string is compiled as follows:
%Default% (%Compatible%; %Version%; %Platform%)

The following table lists some commonly implemented User Agent modifications which can be set for use by Windows CE

Default Compatible Version Platform Description
Mozilla/4.0 compatible MSIE 6.0 Windows NT 5.1 Microsoft Internet Explorer 6.0 under Windows XP RTM/SP1
Mozilla/4.0 compatible MSIE 6.0 Windows NT 5.1; SV1 Microsoft Internet Explorer 6.0 SP2 under Windows XP SP2
Mozilla/4.0 compatible MSIE 5.5 Windows NT 5.0 Microsoft Internet Explorer 5.5 under Windows 2000
Mozilla/4.0 compatible MSIE 7.0 Windows NT 5.1 Microsoft Internet Explorer 7.0 under Windows XP
Mozilla/4.0 compatible MSIE 4.01 Windows CE; PPC; 240x320 Pocket PC 2003
Mozilla/4.0 compatible MSIE 4.01 Windows CE; Smartphone; 176x220 Smartphone 2003
Mozilla/4.0 compatible MSIE 4.01 Windows NT Windows CE HPC2000 Default
  1. Adjust the Default, Compatible, Version and Platform values as required to match the new User Agent
  2. Close the registry editor and soft reset your device for the changes to take effect