HTML and CSS Reference
In-Depth Information
When you click the link, the server
records the following two requests:
"GET /offline-1-b.html HTTP/1.1" 200 -
"GET /example.png HTTP/1.1" 200 -
Again, the page itself is requested as
well as the image embedded in the
second page.
Most browsers, in their default config-
urations, cache recently accessed
pages. If you use the Back and For-
ward buttons in your browser at this
point, no new requests will be made to
the server.
Stop the server (press Ctrl-C/Cmd-C
in the terminal):
^CTraceback (most recent call last):
In the browser, try going back and
forward again. You'll see that the
pages are still there in the browser's
temporary cache. But if you try to
reload the page, the browser tries to
contact the server, finds it's unavail-
able, and shows an error.
The application cache
The application cache is a service provided by HTML5 web browsers
in which you can store your web apps for offline use. To change the
previous example into an offline application, it requires one small
change and an additional file. At the top of the home page, you need to
add a reference to a manifest file, like this from ch06/offline-example/
<html manifest="offline-2.appcache">
Search WWH ::

Custom Search