Should I Write Mobile Phone Code in WML or HTML?
By and far the Wireless Application Protocol, founded by Nokia and Ericsson in 1997 to allow mobile phones used to connect to websites, is out-of-date, replaced by smartphones with full-featured browsers. NetMarketshare states that as of November 2011, 54 percent of mobile users on the Internet use iOS devices. WML, short for Wireless Markup Language, is only used for largely-outdated WAP browsers.
-
WAP Browsers
-
WAP is designed for older mobile phones -- the kind from the late 1990s and early 2000s that used a small monochrome screen, though the protocol is present in later feature phones. WAP browsers are typically viewed on very small screens and only display a few lines at a time; as such, they're better suited for text rather than images. These browsers also remove all scripting, which makes viewing non-optimized websites on a WAP browser more difficult.
WML
-
WML is a language designed especially for phones that use WAP. It takes some protocol from HTMLץ However, it's actually based on XML. As such, it's stricter than HTML; creating a page isn't as simple as porting over your knowledge from HTML into a mobile website. While WML doesn't support scripting, there is a separate language called WML Script. This language was considered a new and interesting bit of language in 2001. But it isn't practical for smartphone browsers.
-
Smartphone Browsers
-
Smartphones are made for browsing. The browsers used on smartphones are mostly mobile versions of the browsers used by PCs. Apple's iPhone uses a mobile version of Safari. In addition, you can download mobile versions of Firefox and Opera. While a smartphone browser isn't completely featured -- it doesn't support JavaScript or Flash -- it does support HTML5 and CSS3, allowing you to create more in-depth and dynamic websites that you cannot handle in WML.
Creating a Mobile Website
-
There are three ways to design a mobile version of your website. The most complicated is to build a complete second website for the mobile version, maintained separately; these can be saved at a subdomain, such as "m.yourdomain.com." Another method is to use CSS3 media queries to detect the browser and device size; if it detects a specific set of parameters, it loads a different stylesheet than if you were using a desktop browser. The third option is somewhere in between, where you use JavaScript to detect the browser and either redirect to a mobile website or change between stylesheets. The Wordwide Web Consortium covers media queries in its manual, "Media Queries."
-
References
Resources
- Photo Credit Ryan McVay/Photodisc/Getty Images