Preface

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.

What this book covers

Chapter 1, HTML5 and the Mobile Web, introduces HTML5 and the mobile web, along with some emulators and simulators.

Chapter 2, Mobile Setup and Optimization, discusses various mobile setups and optimization, such as preventing text resize and optimizing viewport width.

Chapter 3, Interactive Media with Mobile Events, discusses mobile interactions such as gesture events.

Chapter 4, Building Fast and Responsive Websites, talks about the various ways to make mobile websites fast and responsive.

Chapter 5, Mobile Device Access, discusses location-based mobile web and other HTML5 device-specific features.

Chapter 6, Mobile Rich Media, talks about the HTML5 rich media elements that can be used on mobile browsers.

Chapter 7, Mobile Debugging, teaches you ways to work around mobile screen-side constraints and debug mobile websites and web apps effectively.

Chapter 8, Server-Side Tuning, focuses on the server-side tuning for mobile websites.

Chapter 9, Mobile Performance Testing, teaches you various Tools and techniques that can be used to boost mobile performance.

Chapter 10, Emerging Mobile Web Features, talks about ECMAScript 5 as well as mobile-specific features that were added to allow more functionalities with mobile and boost the performance.

What you need for this book

A text editor is all that is needed for most recipes in the book. You should also have a mobile device such as an iPhone, Android, Blackberry, or other device suitable for testing. Although it is best to test things out on a real device, don't worry if you don't have one, because we will cover details on how to use emulators and simulators to test, in case a real device is not available.

Who this book is for

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

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "geolocation is a new property on the navigator object."

A block of code is set as follows:

var latitude = position.coords.latitude;
var longitude = position.coords.longitude;
var accuracy = position.coords.accuracy;

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

var latitude = position.coords.latitude;
var longitude = position.coords.longitude;
var accuracy = position.coords.accuracy;

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Click on the Start button in the Capture Options dialog to start capturing."

Note

Warnings or important notes appear in a box like this.

Note

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or e-mail .

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code for this book

You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset