1.3.4.6. Detecting the Pocket Internet Explorer on the web server

Before the optimised design of web pages for the Pocket Internet Explorer can be applied, first a web server has to be configured to be able to determine if a Pocket PC links to the site. The following paragraph contains the necessary information for the configuration of the Microsoft Internet Information Server.

On the Microsoft Internet Information Services 4.0 or later, a file named BROWSCAP.INI can be found in the directory \WINNT\system32\inetsrv. This file contains the descriptions of all known browsers at the time the latest service pack was installed.

This is the description of the Pocket Internet Explorer which has to be added to the BROWSCAP.INI:

; Pocket PC
[Mozilla/2.0 (compatible; MSIE 3.02; Windows CE; 240x320)]
browser=Pocket IE
version=4.0
majorver=#4
minorver=#0
platform=Windows CE
width=240
height=320
cookies=TRUE
frames=TRUE
backgroundsounds=TRUE
javaapplets=FALSE
javascript=TRUE
vbscript=FALSE
tables=TRUE
activexcontrols=TRUE

The Pocket Internet Explorer is actually a mixture of the Internet Explorer 3.02 (HTML), Internet Explorer 4.0 (scripting) and Internet Explorer 5.0 (XML) components. That is why it will be identified as Microsoft Internet Explorer 3.02 while it uses version 4.0 inside the properties.

When Pocket Internet Explorer sends a request to the HTTP server, the following specific information is included in the HTTP request header:

UA-pixels: {i.e. 240x320}
UA-color: {mono2 | mono4 | color8 | color16 | color24 | color32}
UA-OS: {Windows CE (POCKET PC) - Version 3.0}
UA-CPU = {i.e. MIPS R4111}

Using the following server side script (ASP) lines special optimized pages can be created for the Pocket Internet Explorer:

'Check for Windows CE (Pocket PC, Palm-size PC, Handheld PC, Handheld PC Pro)
if (InStr(Request.ServerVariables("HTTP_USER_AGENT"), "Windows CE")) then
	{ add Windows CE specific code }
else
	{ add code for other platforms }
end if

'Check for Pocket PC
if (InStr(Request.ServerVariables("HTTP_UA_OS"), "POCKET PC")) then
	{ add Pocket PC specific code }
else
	{ add code for other platforms }
end if

To identify the Pocket Internet Explorer using client-side scripting (JScript), the following code can be used:

	var strNav = navigator.userAgent;
// Check for Windows CE (Pocket PC, Palm-size PC, Handheld PC, Handheld PC Pro)
	var isCE = strNav.indexOf("Windows CE");
	if(isCE > -1) {
//add Windows CE specific code
	}
	else {
//add code for other platforms
	}

// Check for Pocket PC
	var isPPC = strNav.indexOf("240x320");
if(isPPC > -1) {
// add Pocket PC specific code
	}
	else {
// add code for other platforms
	}

Copyright © 2001-2003 by Rainer Hillebrand and Thomas Wierlemann