HTML 5 Offline Web Applications

As more application move to the Web, it is tempting to assume 24/7 uninterrupted connectivity for all users, but the reality of the Internet is that interruptions happen and, in situations like air travel, can happen predictably for several hours at a time.
Intermittent connectivity has been the Achilles’ heel of network computing systems. If your applications depend on communication with remote hosts, and those hosts are unreachable, you’re out of luck. However, when you do have an Internet connection, web applications can always be up-to-date, because the code loads from a remote location on each use.

If your applications require only occasional communication, they can still be useful as long as the application resources are stored locally. With the advent of browser-only devices, web applications that continue to function without continuous connectivity will only grow more important. Desktop applications that do not require continuous connectivity have historically held that advantage over web applications.
HTML 5 exposes control over application caching to get the best of both worlds: applications built with web technology that run in the browser and update when they are online but can also be used offline. However, this new offline application feature must be used explicitly, because current web servers do not provide any default caching behaviour for offline applications.
The HTML5 offline application cache makes it possible to augment an application to run without a network connection. You do not need a connection to the Internet just to draft an e-mail. HTML 5 introduces the offline application cache that allows a Web application to run without network connectivity.
An application developer can specify specific additional resources comprising an HTML 5 application (HTML, CSS, JavaScript, and images) to make an application available for offline use. There are many use cases for this, for example:
  • Read and compose e-mail
  • Edit documents
  • Edit and display presentations
  • Create to-do lists

Using offline storage can avoid the normal network requests needed to load an application. If the cache manifest is up to date, the browser knows it does not need to check if the other resources are also up to date, and most of the application can load very quickly out of the local application cache. Additionally, loading resources out of a cache (instead of making multiple HTTP requests to see if resources have been updated) saves bandwidth, which can be especially important for mobile web applications. Currently, slower loading is one way that web applications suffer in comparison with desktop applications. Caching can offset that.
The application cache gives developers explicit control over caching. The cache manifest file allows you to group related resources into a logical application. This is a powerful concept that can give web applications some of the characteristics of desktop applications. You can use this additional power in new, creative ways.

Resources identified in the cache manifest file create what is known as an application cache, which is the place where browsers store the resources persistently, typically on disk. Some browsers give users a way to view the data in the application cache.

No comments:

Post a Comment