HTML and CSS Reference
7. Browser: application cache has updated, and triggers an
event stating so.
Now the browser has fully loaded the cache using the files listed
in the manifest. If the manifest hasn't changed and the browser
is reloaded, here's what happens:
1. Browser: re-requests http://introducinghtml5.com/
2. Browser: detects that it has local cache for this page and
serves it locally
3. Browser: parses index.html , and all assets in the local
cache are served locally
4. Browser: requests the manifest file from the server
5. Server: returns a 304 code notifying the browser that the
manifest hasn't changed.
Once the browser has its cache of assets, it serves them locally
first and then requests the manifest. As shown in Figure 7.3 ,
Safari is loading all the assets for my time application, but at the
same time I'm monitoring the access log for the app, in which
we can see only time.appcache and server-time.js is being
requested over the connection.
FIguRE 7.3 Safari makes a
request for the app loading
using the local cache and
requesting only the manifest
and server-time from the server.
This time, you re-request the
app—but the manifest has
changed. If the manifest has
changed, the process from
Step 1 through 4 is exactly the
same, but next the browser
needs to reload the cache.