Let's take the MANIFEST file out for a spin with our mobile example. The first thing we need to do is decide which resources we want to be included in our application cache and which we want to be excluded. Our application is pretty simple, so we won't need to exclude anything. So, here's what we will do:
Open a text editor and create a new file. Save it as
myapp.appcache
next to your example's HTML file.Determine which files to include in the cache. You can do this in several ways, but the easiest is to load your page into a web browser and look at the Network tab. Here's how your screen looks when the Network tab is pressed:
The first six lines are files requested directly by our application, and the remainder are map tiles loaded from the OpenStreetMap server. We'll explicitly cache the first six in our example.
Add the following lines to the file:
CACHE MANIFEST # version 1 CACHE: 2360OS_10_04_appcache.html ../assets/ol3/ol.css ../assets/css/samples.css...