T610

Erik's notes on Writing for the Sony Ericsson cHTML web browser

Function and other technologies

The cHTML browser of SonyEricsson's cellular phones has restrictions compared to browsers of desktop computers especially when it comes to WWW technologies beyond XTML and CSS. Here is an outline of my experiences with them.

JavaScript

The cHTML browser is not JavaScript enabled. If you embed a JavaScript into the <body> section of your web document, make sure that it is properly sealed off from JavaScript unabled browsers. Otherwise you will see the script code on screen. Example of good sealing:

<script type="text/javascript">
//<![CDATA[
document.write("Updated " + document.lastModified);
//]]>
</script>

This is unlike the mobile telephones produced by Samsung, whose WWW browsers will show no relics of the JavaScripts.

Server Side Includes (SSI)

Server Side Includes are processed on the server, not in the mobile phone. The SSI's add chunks of code (text) into the web document and are referred to using the URLs of the text files. As long as these text chunks comply with the XHTML standard, you are free to use them.

Developers might find these SSI strings helpful:

<!--#echo var="HTTP_ACCEPT"-->
Outputs the accepted MIME types of the user agent.
<!--#echo var="HTTP_USER_AGENT"-->
Outputs the user agent string.
<!--#echo var="HTTP_ACCEPT_LANGUAGE"-->
Outputs the language setting of the user agent.
<!--#echo var="PATH_INFO"-->
Outputs the additional information sent to the script .
<!--#echo var="REMOTE_HOST"-->
Outputs information about the remote host.
<!--#echo var="REMOTE_ADDR"-->
Outputs the remote address. This will be the IP address of the client, in this case the cellular phone.
<!--#echo var="REMOTE_PORT"-->
Outputs the remote port. In the case of (my) mobile phone, it is 57817.
<!--#echo var="SERVER_PROTOCOL"-->
Outputs the server protocol. In most cases, this will be of the sort HTTP/1.1 or HTTP/1.0

My SSI test page at http://www.thau-knudsen.dk/sw/ssi_small_test.shtml will output this information. I advice you to go there with your cell-phone browser if it is not a Sony Ericsson T610.

As for the Sony Ericsson T610, the user agent string (i.e., the output of the SSI <!--#echo var="HTTP_USER_AGENT"-->) is:

SonyEricssonT610/R401 Profile/MIDP-1.0 Configuration/CLDC-1.0

MIME types (i.e., the output of the SSI <!--#echo var="HTTP_ACCEPT"-->) are the following:

  • application/vnd.wap.multipart.mixed
  • image/bmp
  • image/png
  • image/gif
  • image/jpeg
  • image/vnd.wap.wmlc
  • application/vnd.wap.wmlc
  • application/vnd.wap.wbxml
  • application/vnd.wap.wmlscriptc
  • application/xhtml+xml
  • application/vnd.wap.xhtml+xml
  • text/html
  • application/vnd.wap.mms-message
  • application/java-archive
  • application/java
  • application/vnd.oma.dd+xml
  • text/css
  • */*
  • text/x-vcard
  • text/x-vcalendar

Erik Thau-Knudsen, 2005-03-06