8.4 Example: Click to tick! 225
functions. The button labeled Check for new games! reloads the website via lo-
cation.reload and automatically checks if the manifest file has been modified.
8.4.3.2 The Manifest File
After the obligatory first line, the cache manifest contains references to the HTML
code, the JavaScript file, and the stylesheet. Then, the corresponding JavaScript
file and the static map of Google Maps are referenced for each game:
CACHE MANIFEST
application files
click2tick.html
click2tick.js
click2tick.css
gamedata
Downtown Paris
click2tick_game0001.js
http://maps.google.com/maps/api/staticmap?sensor=false&maptype=satellite
&size=640x480¢er=48.864721,2.3105226&zoom=14
Although the map call for the Google Maps map consists of a dynamic URL, the
resulting image is saved in offline storage and correctly loaded even without net-
work access if called. Figure 8.8 shows successful loading of three games into the
application cache.
Figure 8.8 Google Chrome Developer Tools loading the offline cache