Do you have a question? Post it now! No Registration Necessary. Now with pictures!
February 12, 2006, 1:51 pm
rate this thread
Re: XHTML MOBILE
There are a whole bunch of different browsers used on Mobile phones. The
earliest mobile browsers only supported WML, an XML-based markup language
specifically designed for mobile Internet.
As WML evolved it became a trivial extension of XHTML (a few extra
elements and attributes), so fairly soon Mobile browsers started to evolve
that could handle XHTML too.
More modern mobile browsers can understand HTML too.
That said, most mobile browsers still have limitations. Don't expect
Avoid using images larger than 100x100px. (In fact, avoid images
altogether, as 2.5G mobiles only offer fairly slow connections, and the
users pay per byte of download.)
Pages should try to be under 10 kbytes, as mobiles tend to have very
Avoid tables like the plague.
For a site that I've been working on (it's a members only site that
requires logins, so I won't post a URL) I've added a "mobile edition"
All it does is: in my included PHP at the start of the page, print out a
more minimal header (just a DOCTYPE, TITLE and H1 -- no style sheets and
top navigation which the regular version has) and switch on PHP output
buffering. In the PHP included at the foot of the page, grab the text from
the output buffer, strip all the HTML tags out of it except for a few
basic ones (<hX>, <b>, <i>, <p>, <a>, etc), split it into sub-pages if it
is over 10 kbytes, print out the first sub-page, offer links to the other
sub-pages, and a links to the site map, home page, "what's new" and log
out pages. Took about an hour to put together and seems to work quite well.
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact