Windows Phone Thoughts: Making Pocket PC Friendly Web Sites

Be sure to register in our forums! Share your opinions, help others, and enter our contests.


Digital Home Thoughts

Loading feed...

Laptop Thoughts

Loading feed...

Android Thoughts

Loading feed...



Wednesday, August 13, 2003

Making Pocket PC Friendly Web Sites

Posted by Andy Sjostrom in "DEVELOPER" @ 02:00 AM

http://builder.com.com/5100-6373_14-5056990.html

Builder.com has an interesting article on how to make a web site Pocket PC friendly, or mobile device friendly for that matter! The article Pocket PC Web Site Development Tips brings up aspects such as detecting the browser, screen size limitations, scripting and XML support, bandwidth, security, and offline browsing. Pocket PC Thoughts works very nicely on Pocket PCs (nowadays!)! Over at businessanyplace.net we have used browser detection a long time to present the site nicely to mobile devices. If you are interested, you can read on to see some of the code making it possible:

A variable (IsPPC) is set at the beginning of the page by checking the user agent:

[code]<%
' Device Indicators
Public IsPPC, IsMME, IsThinClient
IsPPC = (InStr(Request.ServerVariables("HTTP_USER_AGENT"), "Windows CE") > 0)
IsMME = (InStr(Request.ServerVariables("HTTP_USER_AGENT"), "MME") > 0)
IsThinClient = (IsPPC Or IsMME)
%>[/code]

In the rest of the page, we can use the variable to determine programmatically how specific parts of the page should be formatted. For example, this code segment is located at the very end of a page:

[code]<% If Not IsPPC Then %>
<table cellspacing="0" cellpadding="0" width="758" border="0">
<tr>
<td align="middle" colSpan="3"><img src="images/1x1empty.gif" width="100%" height="2"><br><img
src="images/1x1black.gif" width="758" height="1" vspace="2"></td>
</tr>
<tr>
<td valign="top"><% ' left footer %></td>
<td valign="top"><% ' center footer %></td>
<td valign="top" align="right">©2001 Andreas Sjöström & Christian Forsberg<br>
<% If False Then %><a href="mailto:[email protected]">Contact us</a><% End If %></td>
</tr>
</table>
<% Else %>
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tr><td><img src="images/1x1black.gif" width="100%" height="1" vspace="2"></td></tr>
</table>
<font size="1">©2001 Andreas Sjöström & Christian Forsberg<br></font>
<% End If %>[/code]

Tags:

Reviews & Articles

Loading feed...

News

Loading feed...

Reviews & Articles

Loading feed...

News

Loading feed...

Reviews & Articles

Loading feed...

News

Loading feed...

Reviews & Articles

Loading feed...

News

Loading feed...

Reviews & Articles

Loading feed...

News

Loading feed...