PacktLib: HTML5 Mobile Development Cookbook

HTML5 Mobile Development Cookbook


About the Author

About the Reviewers


HTML5 and the Mobile Web


Setting up mobile development tools

BlackBerry simulator

Setting up the mobile development environment

Using HTML5 on the mobile web

Rendering HTML5 across different browsers

Designing for mobile

Defining a content strategy

Mobile Setup and Optimization


Adding a home screen button icon

Preventing text resize

Optimizing viewport width

Fixing Mobile Safari screen re-flow scale

Launching phone-specific programs from the browser

Enabling iPhone start screen in full screen mode

Prevent iOS from zooming onfocus

Disabling or limiting WebKit features

Interactive Media with Mobile Events


Moving an element with touch events

Detecting and handling orientation event

Rotating an HTML element with gesture events

Making a carousel with swipe events

Zooming an image with gesture events

Building Fast and Responsive Websites


Building pages using HTML5 semantics

Using CSS3 features for progressive enhancement

Applying responsive design

Optimizing polyfills script loading

Applying user agent detection

Adding mobile bookmark bubble to the home page

Building Contact page with textarea and autogrow forms

Making buttons with instant response

Hiding WebKit chrome

Building a mobile sitemap

Mobile Device Access


Getting your location

Handling cross-browser geolocation

Displaying a map based on your geolocation

Displaying location in realtime

Using the DeviceOrientation event

Using geolocation with foursquare

Mobile Rich Media


Playing audio on mobile

Streaming video on your mobile

Using offline caching

Using Web Storage on mobile

Using web workers

Creating Flash-like navigation with session and history API

Mobile Debugging


Remote debugging with Opera Dragonfly

Remote debugging with weinre

Using Firebug on mobile

Remote JavaScript debugging with JS Console

Setting up Mobile Safari debugging

Server-Side Tuning


Preventing mobile transcoding

Adding mobile MIME types

Making cache manifest display properly

Setting far future expire headers

Compressing files using Gzip

Removing ETags

Mobile Performance Testing


Speed testing your device with Blaze

Analyzing mobile page speed online

Analyzing mobile performance with PCAP Web Performance Analyzer

Using HTTP Archive Mobile

Storing performance data with Jdrop

Emerging Mobile Web Features



Using ECMAScript 5 methods

New HTML5 input types

Inline SVG in text/HTML