CREATE A “WEBSITE OFFLINE” FALLBACK PAGE

As described earlier in the section “Create an Application Cache Manifest,” your AppCache manifest file can be configured with a FALLBACK section. This can be used to describe a cached file that will be displayed to the user in place of caching the primary file while the user is offline.

This is an excellent way to provide a fallback to dynamic CGI code that requires the server to deliver content while the user is offline; instead of displaying a cached web page that says “Sorry, this web page is available only while connected to the Internet.”

In supporting web browsers, the DOM fires off specific events when the browser notices that the network connection has gone offline and comes back online.

Specifically, ...

Get HTML5: Your visual blueprint™ for designing rich web pages and 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.