View Single Post
  #5 (permalink)  
Old 07-22-2003, 09:23 PM
entropy1980
Oracle
Join Date: Aug 2006
Posts: 881

Quote:
Originally Posted by merlin
I've been using this code for ASP pages:


Code:
<%

'	This specifically tests for Pocket IE on Pocket PC 2002 by searching for the "PPC" string within
'	the User Agent field. "PPC" is only inclued in the USER AGENT header field on Pocket PC 2002.

	userAgent = Request.ServerVariables("HTTP_USER_AGENT")
	

	isPocketPc = false



	'	This check to see if the browser is any version of MSIE on Windows CE. That way, if the browser
	'	gets updated, this should still detect that it is from a Windows CE machine.

	if(userAgent <> "" AND (InStr(userAgent, "PPC") > 0)) then
		
		isPocketPc = true

	end if

	if isPocketPc then
		

		'	If the user is connecting with a pocket pc, then we redirect them to another page.

		response.redirect("mobile/index.htm")

	end if
%>
The problem I see is that PPC is sometimes the UA of Mac's so some Mac browsers start getting the mobile version...
 
Reply With Quote