HTML5 Mobile Development Cookbook

Over 60 recipes for building fast, responsive HTML5 mobile websites for iPhone 5, Android, Windows Phone, and Blackberry with this book and ebook

HTML5 Mobile Development Cookbook

Cookbook
Shi Chuan

Over 60 recipes for building fast, responsive HTML5 mobile websites for iPhone 5, Android, Windows Phone, and Blackberry with this book and ebook
$23.99
$39.99
RRP $23.99
RRP $39.99
eBook
Print + eBook
$12.99 p/month

Get Access

Get Unlimited Access to every Packt eBook and Video course

Enjoy full and instant access to over 3000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781849691963
Paperback254 pages

About This Book

  • Solve your cross platform development issues by implementing device and content adaptation recipes.
  • Maximum action, minimum theory allowing you to dive straight into HTML5 mobile web development.
  • Incorporate HTML5-rich media and geo-location into your mobile websites.

 

Who This Book Is For

Developers keen to create HTML5 mobile websites that are fast and responsive across a whole range of mobile devices.

Table of Contents

Chapter 1: HTML5 and the Mobile Web
Introduction
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
Chapter 2: Mobile Setup and Optimization
Introduction
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
Chapter 3: Interactive Media with Mobile Events
Introduction
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
Chapter 4: Building Fast and Responsive Websites
Introduction
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
Chapter 5: Mobile Device Access
Introduction
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
Chapter 6: Mobile Rich Media
Introduction
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
Chapter 7: Mobile Debugging
Introduction
Remote debugging with Opera Dragonfly
Remote debugging with weinre
Using Firebug on mobile
Remote JavaScript debugging with JS Console
Setting up Mobile Safari debugging
Chapter 8: Server-Side Tuning
Introduction
Preventing mobile transcoding
Adding mobile MIME types
Making cache manifest display properly
Setting far future expire headers
Compressing files using Gzip
Removing ETags
Chapter 9: Mobile Performance Testing
Introduction
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
Chapter 10: Emerging Mobile Web Features
Introduction
window.onerror
Using ECMAScript 5 methods
New HTML5 input types
Inline SVG in text/HTML
position:fixed
overflow:scroll

What You Will Learn

  • Master the art of mobile web design for multiple platforms.
  • Execute best practice guidelines for cross platform development.
  • Create fast and responsive mobile websites.
  • Debug mobile websites efficiently and effectively.
  • Leverage HTML5 multimedia features such as Canvas and SVG for the mobile web.
  • Build HTML5 geo-location based applications.
  • Take a sneak peek into the exciting world of emerging mobile web technologies such as AJAX 2.
  • Integrate your mobile websites with Facebook and Twitter.

 

In Detail

How do I create fast and responsive mobile websites that work across a range of platforms? For developers dealing with the proliferation of mobile devices each with unique screen sizes and performance limitations, it is an important question. This cookbook provides the answer. You will learn how to apply the latest HTML5 mobile web features effectively across a range of mobile devices.

HTML5 Mobile Development Cookbook will show you how to plan, build, debug and optimize mobile websites. Apply the latest HTML5 features that are best for mobile, while discovering emerging mobile web features to integrate in your mobile sites.

Build a rock-solid default mobile HTML template and understand mobile user interaction. Make your site fast and responsive, leveraging the uniqueness of location-based mobile features and mobile rich media. Make your mobile website perfect using debugging, performance optimization and server-side tuning. The book finishes with a sneak preview of future mobile web technologies.

Authors

Table of Contents

Chapter 1: HTML5 and the Mobile Web
Introduction
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
Chapter 2: Mobile Setup and Optimization
Introduction
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
Chapter 3: Interactive Media with Mobile Events
Introduction
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
Chapter 4: Building Fast and Responsive Websites
Introduction
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
Chapter 5: Mobile Device Access
Introduction
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
Chapter 6: Mobile Rich Media
Introduction
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
Chapter 7: Mobile Debugging
Introduction
Remote debugging with Opera Dragonfly
Remote debugging with weinre
Using Firebug on mobile
Remote JavaScript debugging with JS Console
Setting up Mobile Safari debugging
Chapter 8: Server-Side Tuning
Introduction
Preventing mobile transcoding
Adding mobile MIME types
Making cache manifest display properly
Setting far future expire headers
Compressing files using Gzip
Removing ETags
Chapter 9: Mobile Performance Testing
Introduction
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
Chapter 10: Emerging Mobile Web Features
Introduction
window.onerror
Using ECMAScript 5 methods
New HTML5 input types
Inline SVG in text/HTML
position:fixed
overflow:scroll

Book Details

ISBN 139781849691963
Paperback254 pages
Read More