Book Information

Pro HTML5 Programming, Second Edition

Copyright © 2011 by Peter Lubbers, Brian Albers, and Frank Salim

All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher.

The W3C logo on the front cover is licensed under Creative Commons Attribution 3.0. The Creative Commons license applies to the use of the logo provided on the front cover and no other content from this book.

ISBN-13 (pbk): 978-1-4302-3864-5

ISBN-13 (electronic): 978-1-4302-3865-2

Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.

The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.

President and Publisher: Paul Manning
Lead Editor: Ben Renow-Clarke
Technical Reviewer: Tony Pye
Editorial Board: Steve Anglin, Mark Beckner, Ewan Buckingham, Gary Cornell, Morgan Ertel, Jonathan Gennick, Jonathan Hassell, Robert Hutchinson, Michelle Lowman, James Markham, Matthew Moodie, Jeff Olson, Jeffrey Pepper, Douglas Pundick, Ben Renow-Clarke, Dominic Shakeshaft, Gwenan Spearing, Matt Wade, Tom Welsh
Coordinating Editors: Debra Kelly and Jennifer L. Blackwell
Copy Editors: Heather Lang, Andy Rosenthal, and Nancy Sixsmith Compositor: Bytheway Publishing Services
Indexer: SPI Global
Artist: SPI Global
Illustrations by: Peter Cohen
Cover Designer: Anna Ishchenko

Distributed to the book trade worldwide by Springer Science+Business Media, NY, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail, or visit

For information on translations, please e-mail, or visit

Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Special Bulk Sales–eBook Licensing web page at

The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work.

Any source code or other supplementary materials referenced by the author in this text is available to readers at For detailed information about how to locate your book's source code, go to


I’d like to thank my wife, Vittoria, for her love and patience, and my talented sons, Sean and Rocky—reach for the stars, boys!

Thanks to my parents, Herman and Elisabeth, my sister, Alice, and my brother, David, for always believing in me, and to my late grandmother Gebbechien whose courageous acts during the Nazi occupation of Holland were a great lesson to our family.

To my coauthors, the never-tiring Brian and the code-generating human Frank, it has been an honor to work with both of you.

Thanks also to Clay at Apress for all your support, and, finally, thanks to Jonas and John at Kaazing for pushing us to write a “real” book—an “unofficial e-book” would still be just a figment of our imagination, I am sure!

—Peter Lubbers

To my parents, Ken and Patty Albers, I offer my deepest love and appreciation for the sacrifices you made to bring me so many opportunities. Without your encouragement and the values you instilled in me, I would never have completed this or any other major life journey. You’ve been guiding me every step of the way.

To John, my deepest thanks for your patience every time that extra hour of work stretched to two, three, or more. You amaze and inspire me.

To Pitch, Bonnie, and Penelope, a scritch on the chin and a promise that dinner won’t be so late any more. To the cats who came before, your purrs stay with me.

To my coworkers at Kaazing, much appreciation for the chance to work with the best and the brightest.

And a special thanks to the editorial staff at Apress for first believing that the time was right for an HTML5 book and then for having patience with us while we attempted to document a rapidly moving target.

—Brian Albers

I’d like to thank my parents, Mary and Sabri, who are responsible for my existence and without whom this book would literally not be possible.

—Frank Salim