Andrey, the mobile phone browsers are a hard nut to crack. I've just
researched this for an upcoming project, so let me summarize the field:
1. WML phones understand only WML, either served natively from the
webserver (with the proper MIME type) or as converted from (X)HTML by
their provider's WAP Gateway (WAP phones do not speak HTTP, they connect
to the gateway via the WAP protocol and the gateway takes care of the
HTTP leg). Scripting only via WMLScript, an ECMAScript based scripting
language (AFAIK, gateways don't even try to convert Javascript). No CSS.
Images only in WBMP (wireless bitmap) 2-bit format (pixels are black or
white, forget about greyscale, much less color). Gateways do convert
common image formats. Very narrow limits of page (called deck) size (the
stinkiest on record accepted no more than 8.192 bytes per page, images
included). Development stopped long ago.
2. 'imode' phones (popular in Japan, some diffusion in Europe and
stateside) understand cHTML (compact HTML), also called i-html, which is
a subset of HTML 3.2. Browsers are known to crash if served proper HTML
or XHTML (e.g.: closing your LIs is all but guaranteed to send the
browser into a spin). No scripting, no CSS. GIFs are okay (but there are
limits on filesize, for animations limits on loops too). JPEGs only on
newer phones, sometimes FlashLite. Java MIDlets on all models but the
oldest. Will converge on XHTML MP in the future, but have still a long
way to go.
3. XHTML Basic just went nowhere, 'cause the browser makers found it too
basic and extended it into:
4. XHTML MP (Mobile Profile), which is the current baseline standard.
'Should' have no problem with most of XHTML, a limited subset of CSS
(missing mostly what would be most useful, like floats), no scripting.
GIFs and JPEGs are common, PNGs only on newer models. All XHTML MP
browsers understand WML too (so if you absolutely need scripting you can
link to a separate WML page with a WMLScript). Differences between
browsers are way greater than anything in the desktop world (think
Firefox vs. Netscape 3). There are sporadic cases of TinySVG and
FlashLite support, but don't rely on this. Java MIDlets are generally
supported.
4½. A long time ago there was a half-offline format for Palm Pilots too,
using a proprietary network linked to the Net. The whole show has been
disbanded since.
5. Finally, some high-end phones have a proper web browser (namely,
Opera 8) and can do with everydays web pages. A future Nokia phone will
come with a browser based on khtml (Safari). Windows CE based palmtops
come with Mobile Internet Explorer, which (who would have guessed?)
makes a mess of CSS media types and applies both the screen stylesheet
and the handheld one. Such support for ordinary web pages is therefore
expected ti increase with time.
Another hitch: phone owners just do not upgrade their browsers. They're
far more likely to buy a new phone that to mess with the handset's
preinstalled software.
The best solution I've found up to now is WURFL
(http://wurfl.sourceforge.net), which is an open source effort to build
a database of mobile phone characteristics, downloadable as a XML file
(couple thousands user agents in it). Tools for data retrieval are
available for Java, Perl, PHP, Ruby, Python and others. There is a
(fairly technical) mailing list at
http://groups.yahoo.com/group/wmlprogramming.
Most of the list contibutors seems to use WALL
(http://wurfl.sourceforge.net/java/wall.php), a Java/JSP taglib that (if
I got it right) lets you use in your pages stuff like
wall:a href=http://url; title=titlelink/wall:a and converts on
the fly to the browser's preferred markup (reading the user agent and
quering the XML file with it). There is a PHP version at
http://laacz.lv/dev/Wall/ .
A final note: nobody seems to know how many (or if somebody at all)
really uses to browse via mobile. Some 6 months ago the british BBC
(which maintais a wireless version of their news site) published
detailed stats of the browsers visiting them. It went down in detail
tallying even WebTV and PSP visitors, but there were no recognizable
phone browsers at all. We all might be just chasing our wishful dreams
on that front.
djn
--
Dejan Kozina
Dolina 346 (TS) - I-34018 Italy
tel./fax: +39 040 228 436 - cell.: +39 348 7355 225
http://www.kozina.com/ - e-mail: [EMAIL PROTECTED]
**
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list getting help
**