One of the more frustrating things about Mobile browsing is number of sites that don’t work. This has historically been a problem with WAP. Mobile browsers aren’t like desktop browsers which generally can display even very badly written pages with all sorts of coding errors. Most mobile browsers need to be feed perfect valid and well-formed xhtml or wml. A single little bug like forgetting to close a tag or improper nesting of elements, will cause a typical mobile browser to throw up it hands and cry “syntax error” rather than displaying even a partial page. That’s just the way it is. While I believe that browsers should be more forgiving, developers need to deal with what’s out in the field right now. As bad as that sounds, it used to be much worse. Many of the early WAP-enabled phones had buggy browsers that would error out even on a perfectly written page. Developers had to test their sites on an assortment of popular phones and then code device-specific workarounds to have any hope yhat their sites would work on the majority of phones.
Things have gotten much easier for mobile developers. It’s still a good idea to test on a variety of real devices to achieve maximum usability but it’s much less necessary than before. Modern mobile browsers can generally be expected to at least display any valid wml, html or xhtml-mp page as long as it’s not too large. Keeping markup under 3KB per page for html and xhtml and under 2KB for wml is prudent unless you are using browser detection and wurfl or a similar database of browser capabilities to determine browser-specific size limits. Even more important is to write valid markup. It’s not that hard as long as you do one simple thing – run a validator against you markup and fix any reported errors. The online validator at http://validator.w3.org/ handles html, xhtml (including mobile profile) and wml and works great. It’s fast, free and very easy to use.
I am just appalled that mobile sites from major web properties are still failing validation and thus flat out don’t work on many phones. I’m not going to name names at this time – but the mobile sites of very big search and online advertising vendor, a major shopping site and a top web portal and IM service are all currently broken for a sizable percentage of mobile phones. I’m trying to contact the technical people at these sites to report the problems – not that I think that will help – but it’s the decent thing to do especially if I decide to name names later.
I’d really like to see mobile webmasters clean up their act – a broken mobile site is bad for the image of the whole industry. If the mobile web is to win mass acceptance it has to just work.
If you have a mobile site, validate it today – and fix those errors. Click here to see the W3C validator in action