HTML and CSS Reference
If you've been working through this chapter's example without a web server, it's worth
pointing out that you won't be able to use the application cache manifest unless your ap-
plication resides on an actual web server (rather than just sitting in a local directory). You'll
also need to do a small bit of configuration to get cache manifests to work, which we'll
cover later in the section.
The cache manifest can also specify URIs that must be fetched from the network. They will
never be downloaded from the application cache, even if the application is offline.
In this section, you'll learn
• How to configure a web server for an application cache manifest MIME type
• How to create a cache manifest file
• How to detect changes in the manifest file
Now that you have a basic understanding of the application cache manifest, let's implement
offline functionality for My Tasks. This process will be broken down into three steps:
• Step 1: Configure the web server to serve application cache manifest files for My
• Step 2: Create an application cache manifest file for My Tasks.
• Step 3: Detect changes in the My Tasks application cache manifest file.
5.4.1. Configuring a web server for an application cache manifest's MIME type
In order for a manifest file to be correctly loaded, your web server needs to serve a manifest
file using the correct MIME type. The manifest MIME type is not typically set by default
in a web server's configuration, so you'll need to add the MIME type, text/cache-
manifest , to your web server's configuration.