O'Reilly logo

Beginning Smartphone Web Development: Building JavaScript, CSS, HTML and Ajax-based Applications for iPhone, Android, Palm Pre, BlackBerry, Windows Mobile, and Nokia S60 by Gail Frederick

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required