HTML and CSS Reference
Creating a Cache Manifest
As mentioned earlier, a cache manifest is a text file that lists files to be cached. In this example, you use
.cachemanifest as the file extension and learn how to inform IIS about this extension.
The cache manifest file consists of a cache manifest declaration followed by one or more sections:
CACHE , NETWORK , and FALLBACK . The cache manifest declaration looks like this:
All cache manifest files must begin with this line. Other than the CACHE section, the other sections are
optional and are discussed next.
n Note Cache manifest files are case sensitive. Be sure you key in the section names as well as file names
exactly as shown in the example code.
The CACHE Section of the Cache Manifest
The CACHE section of a cache manifest lists all the files that are to be cached on the client side. The files may
files listed in Table 8-1.
Table 8-1. Files Used in the Clock Application
The main web form where the clock is displayed
The CSS file that includes styles being used in the Clock application
A jQuery library that is necessary for the Clock application to work
An HTML5 logo that is displayed at the bottom of the Clock application
The files displayed in Table 8-1 are specified in the cache manifest as shown in Listing 8-1.
Listing 8-1. CACHE section of the Cache Manifest File
Notice that the CACHE section name is followed by a colon ( : ) character. Files to be cached are listed
one per line.
CACHE is an implicit section. That means if you don't explicitly specify CACHE , the files are assumed to
belong to the CACHE section. So, Listing 8-1 and Listing 8-2 are equivalent.