Fundamentally, there is one Web. Its content is standardized markup, styles, scripts, and multimedia viewable using web browsers. In this book, by convention, we call this the Web the Desktop Web. It is what we surf in Firefox or Opera or Internet Explorer on our desktops, laptops, and netbooks. The Web is a vast collection of servers linked by TCP/IP computer networks. Many of these servers, known as web servers, implement the Hypertext Transfer Protocol (HTTP) to share documents and files. Web servers provide access by Uniform Resource Identifiers (URIs) to text files, markup documents, and binary resources.
In an HTTP request, the client sends a web server the URI of the desired resource and a collection of request headers, one of which contains a list of MIME types that advertise
the content types supported on the client. In an HTTP response, the web server sends the client the document itself (markup, text, or binary) and another set of headers, one of which contains the MIME type describing the file type of the document transmitted to the client.
The Mobile Web uses the plumbing of the Desktop Web and adds new MIME types, markup languages, document formats, and best practices to provide web content optimized for the small screens, resource constraints, and usability challenges of web browsers on mobile devices. The Mobile Web introduces new components into the web ecosystem, including:
Markup languages and styles optimized for mobile devices MIME types that differentiate mobile markup from desktop HTML Browser clients with a wide variety of capabilities
Network proxies that further adapt your content to cater for those clients If the Mobile Web is the Wild West, then the Desktop Web is an island paradise. The Desktop Web is a safe and well-understood development environment driven by client technologies steeped in established standards. At the time of this writing, the Desktop Web is nearly 20 years old. Desktop browser clients are public, free, freely available, and frequently updated. Only a handful of software vendors and open-source projects produce the dominant web browsers in use today, reducing the testing burden for cross-platform web development. In the desktop ecosystem, if a web page reaches the destination browser, its markup is almost always left unaltered en route by intermediary servers on the Internet. Network owners and Internet Service Providers (ISPs) are not interested in optimizing and improving the web experience through automated markup adaptation and content repackaging (see Table 1-1 for a list of the characteristics that define the Mobile Web and the Desktop Web).
Desktop Web filtering software can prevent viewing of objectionable web pages, but web filters work by blocking page access rather than adapting page syntax. Mobile Web development is a new discipline for these reasons: The Mobile Web ecosystem is totally new. The Mobile Web uses the plumbing of the Desktop Web, but it has new best practices and new gotchas derived from the unique attributes of mobile devices. Desktop metaphors do not apply. Bandwidth consumption is a concern, even for smartphones. Rich Web 2.0 features such as JavaScript frameworks and Asynchronous JavaScript and XML (AJAX) must be used judiciously, or you risk draining battery power.
Operators frequently control and block traffic to Mobile Web sites. Transcoding proxies often attempt to reformat mobile markup en route to a mobile browser. Finally, defensive programming is essential to reduce exposure to transcoders and mobile network problems. The Mobile Web user is totally new. Mobile Web users have unique usage patterns and navigation methods. Mobile users are keenly goal-directed and location-aware. Roaming in and out of coverage areas, mobile users count network access problems among the top
factors affecting the Mobile Web browsing experience. In fact, cost-sensitive mobile users prefer to cancel the network transaction rather than risk a chargeable mistake.
The Mobile Web browser is totally new. The mobile browser has unique benefits, quirks, and workarounds. Partial and flawed implementations of web standards are commonplace. Improperly formatted web pages can have drastic effects on mobile devices, including crashing the browser or resetting the device. Advanced web features such as JavaScript and AJAX are highly desirable but drain battery life. With more than a dozen mobile browser vendors in the marketplace, the burden of ensuring compliance with web standards falls to OEMs and operators.


