Chapter 4. Device Awareness and Content Adaptation

Your new knowledge of mobile markup syntax and best practices makes you ready to adapt Mobile Web content to increase compatibility and usability across mobile devices and browsers. Adapting a Mobile Web site to target mobile browser and device capabilities is achieved by applying two core principles of Mobile Web development: device recognition and content adaptation.

Device awareness is attained by inspecting the User-Agent and other HTTP request headers to identify Web traffic from mobile devices and provide information about device characteristics. Developers use a device database and accompanying API to identify the device that originates the Web request. Once the device is identified, the ...

Get Beginning Smartphone Web Development: Building JavaScript, CSS, HTML and Ajax-based Applications for iPhone, Android, Palm Pre, BlackBerry, Windows Mobile, and Nokia S60 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.