HTML and CSS Reference
In-Depth Information
headshots/ dust-puppy-4.gif
In addition to multiple FALLBACK sections and a NETWORK section, this list-
ing has two CACHE sections. There are two because CACHE is the default
assumption at the start of the manifest file. It's possible to switch
between sections at any point by adding one of the three keywords on a
line by itself. This means the manifest file can be arranged to suit the
application rather than forcing everything to fit into three sections.
The other interesting feature of this manifest file is that it demonstrates
the pattern-matching and wildcard ability of the FALLBACK and NETWORK
sections. The NETWORK section has a star in it, which means “match any-
thing”— anything that isn't listed is requested from the network. This
is the default behavior, so it's not necessary to include it here, but if you
were developing real offline applications you'd include URL patterns
for your API in this section.
The second FALLBACK section includes a directory. It's saying, “For any-
thing in the folder headshots, fall back to dust-puppy-4.gif when offline.”
This screenshot shows ch06/offline-
example/offline-4.html when online.
Here's the markup for this example:
<img src="example-4.png"
alt="An example image">
<p>Example starring:</p>
<img src="headshots/pitr.gif"
<img src="headshots/mike.gif"
<img src="headshots/stef.gif"
Search WWH ::

Custom Search