Preface

This book reflects the evolution of the Web. Less and less can programming be treated as a distinct activity shoehorned into web pages through scripts. Instead, HTML and JavaScript are now intertwined in producing an enchanting user experience. With this book, you can master the latest in this evolution.

How This Book Is Organized

The elements of this book are as follows:

Chapter 1, The Web As Application Platform

Introduces the reasons for programming on the new HTML5 platforms and what they offer to the JavaScript programmer

Chapter 2, The Power of JavaScript

Explains some powerful features of JavaScript you may not already know, and why you need to use them to exploit the HTML5 features and associated libraries covered in this book

Chapter 3, Testing JavaScript Applications

Shows how to create and use tests in the unique environment provided by JavaScript and browsers

Chapter 4, Local Storage

Describes the localStorage and sessionStorage objects that permit simple data caching in the browser

Chapter 5, IndexedDB

Shows the more powerful NoSQL database that supports local storage

Chapter 6, Files

Describes how to read and upload files from the user’s system

Chapter 7, Taking It Offline

Describes the steps you must go through to permit a user to use your application when the device is disconnected from the Internet

Chapter 8, Splitting Up Work Through Web Workers

Shows the multithreading capabilities of HTML5 and JavaScript

Chapter 9, Web Sockets

Shows how to transfer data between the browser and server more efficiently by using web sockets

Chapter 10, New Tags

Summarizes tags introduced in HTML5 that are of particular interest to the web programmer

Appendix A

Describes tools used in the book, and others that can make coding easier and more accurate

Conventions Used in This Book

The following typographical conventions are used in this book:

Italic

Indicates new terms, URLs, email addresses, filenames, and file extensions

Constant width

Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords

Constant width bold

Shows commands or other text that should be typed literally by the user

Constant width italic

Shows text that should be replaced with user-supplied values or by values determined by context

Tip

This icon signifies a tip, suggestion, or general note.

Caution

This icon indicates a warning or caution.

Using Code Examples

This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission.

We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: “Programming HTML5 Applications by Zachary Kessin (O’Reilly). Copyright 2012 Zachary Kessin, 978-1-449-39908-5.”

If you feel your use of code examples falls outside fair use or the permission given here, feel free to contact us at .

Safari® Books Online

Note

Safari Books Online is an on-demand digital library that lets you easily search more than 7,500 technology and creative reference books and videos to find the answers you need quickly.

With a subscription, you can read any page and watch any video from our library online. Read books on your cell phone and mobile devices. Access new titles before they are available for print, and get exclusive access to manuscripts in development and post feedback for the authors. Copy and paste code samples, organize your favorites, download chapters, bookmark key sections, create notes, print out pages, and benefit from tons of other time-saving features.

O’Reilly Media has uploaded this book to the Safari Books Online service. To have full digital access to this book and others on similar topics from O’Reilly and other publishers, sign up for free at http://my.safaribooksonline.com.

How to Contact Us

Please address comments and questions concerning this book to the publisher:

O’Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
800-998-9938 (in the United States or Canada)
707-829-0515 (international or local)
707-829-0104 (fax)

We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at:

http://shop.oreilly.com/product/0636920015116.do

To comment or ask technical questions about this book, send email to:

For more information about our books, courses, conferences, and news, see our website at http://www.oreilly.com.

Find us on Facebook: http://facebook.com/oreilly

Follow us on Twitter: http://twitter.com/oreillymedia

Watch us on YouTube: http://www.youtube.com/oreillymedia

Acknowledgments

A book is a team effort, and I could not have written this book without a great team behind me. First of all, I must thank Simon St. Laurent for giving me the chance to write this book and supporting me through the process of putting it together. I must also thank Andy Oram for his editorial prowess and ability to make the book better. Also, thank you to my technical reviewers, Shelley Powers and Dionysios Synodinos, for great feedback.

I must also thank the Israeli developer community for existing: my former coworkers at Mytopia, who supported me in this project for more than a year, and the gang at Sayeret Lambda, which has become the place in Tel Aviv to talk about programming.

Finally, I would like to thank my wife, Devora, for all her support in this project. I could not have done it without you.

Get Programming HTML5 Applications 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.