HTML and CSS Reference
In-Depth Information
Before going into the application cache, you'll set up a development
environment and then get a reminder of how web applications work
when they're online.
Setting up a development environment
The examples in this section use a local web server, the Python module
SimpleHTTPServer , so you can see both ends of the communication in real
time. If you're running Linux, this module is probably already installed;
otherwise you'll have to install a standard distribution of Python.
SimpleHTTPServer records a line like this every time a request is made
(it's been split into three sections so it fits better on a single page):
Requested server name
localhost.localdomain -
Date and time of request
- [13/May/2011 21:20:16]
Protocol and version
" GET /offline-1-a.html HTTP/1.1" 200 -
Request method
Requested file
Response status
The only parts we're interested in are
the request and the status code, so I'll
elide the extra details in the examples
that follow.
In order to understand what's going on
with offline web applications, you first
need a good understanding of what
normally happens as the browser and
the web server communicate in order
to display a web page. Let's first exam-
ine the interaction between the web
browser and the server for a simple
App cache
Local storage
Search WWH ::

Custom Search