At this point, we have learned how to cache our files on the client side using the application manifest interface to not only speed up our site, but also make it available to our users when they are offline. However, this technique doesn’t take into account what you should do to handle interactions by the user. In this case, we need to make sure our application has usable parts that can make the application seamless when they lose connection.
Before we proceed, let’s define a simple use case for why handling an offline application is useful to both the user and us. Let’s say we have a user named John, and John is commuting to work and is currently updating his profile in a web application on his iPhone. The commute involves some spotty network connections, and sometimes he does lose connection. He would like to be able to continue using the application while he is on his way to work, instead of waiting to do so at work.
Given the world we live...