C H A P T E R  12

Offline Apps and Storage

There's a variety of ways to speed up your application by cacheing certain amounts of data on the client. Before HTML5 you could only store cookies or rely on the browser's cacheing mechanism. Now you can implement a variety of ways, by storing long-term data via the localStorage object, session data via the sessionStorage object, or even an entire application via applicationCache. Depending on the kind of application you are writing you may use none or all of these features.

The first mechanism I discuss is how to take your entire application offline, or in the case of no network, a way to make your web app work entirely in offline mode. Some HTML5 books talk about WebSQL, or the ability to access ...

Get Learn HTML5 and JavaScript for iOS 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.