HTML5 Guidelines for Web Developers

(coco) #1

218 Chapter 8—Web Storage and Offline Web Applications


The HTTP status code 200 means that the file was fully processed; 304 , however,
means that the file remains unmodified and is not reprocessed.
The next debugging options are integrated in the browsers. Here, the status is
different in each browser; the most convenient tools can currently be found in
Firefox and Google Chrome.
Google Chrome tracks the current state of the applicationCache object in the De-
veloper Tools console. Figure 8.4 shows a first call of the page during which the
browser creates the offline storage. Then, all related documents are download-
ed, with the progress event being fired each time (see also, section 8.2.2, Offline
Status and Events). Reloading the page creates the noupdate event because the
cache manifest file has not been modified. Chrome lists the events very clearly
in order.

Figure 8.4 Google Chrome status messages for offline storage

The developers of Mozilla Firefox integrated information about the cache di-
rectly in the browser. Under the address about:cache?device=offline, Firefox
displays all elements in this cache as a list. If the browser is in offline mode, you
can get even more detailed info on each element, such as the location of the file
on the hard disk (see Figure 8.5).
Free download pdf