HTML and CSS Reference
In-Depth Information
Here's what the contents of my time.appcache look like:
CACHE MANIFEST
index.html
time.js
time.css
FALLBACK:
server-time.js fallback-server-time.js
NETWORK:
*
# version 8
The format of the file is important. You'll see the first line is
CACHE MANIFEST . This tells the browser that what follows is the
source to a manifest file. Within the manifest, files are listed
under categories, also known as namespaces. The default cate-
gory is CACHE , and if it isn't stated, all the filenames encountered
are put in that category until the browser hits a new category.
So with that in mind, I could have written my file to look like the
following—and it would have the exact same effect:
CACHE MANIFEST
CACHE:
index.html
time.js
time.css
FALLBACK:
server-time.js fallback-server-time.js
NETWORK:
*
NoTE The web page that
includes the manifest (in
the <html> tag) is also implicitly
included in the cache manifest.
For this reason, I recommend
explicitly including the file,
index.html in my case, in the
manifest so you don't get con-
fused further along in the devel-
opment of your project.
# version 9
Yo u c a n r e p e a t a c a t e g To r y, t To To . To a p p e n d n e w i l e s t To b e
included in the cache, include them at the end of the file so the
manifest reads: cache, fallback, cache. This is perfectly valid, too.
FALLBACK tells the browser that if anything matches the URL
on the left, in my case server-time.js , and it's not in the
 
Search WWH ::




Custom Search