HTML and CSS Reference
In-Depth Information
Finally, you may want to send a message to the server. This is done
with the send() method on the socket object, passing the message as the
function send() {
var msg = document
The server is set up to echo back
any message it receives.
The WebSockets communication protocol has changed frequently
during development, so if you encounter difficulties, check that
both client and server are using the same version of the protocol.
Offline web applications
Although in the modern world we sometimes take connectivity for
granted, there are plenty of situations where you might want access to
web applications when you're offline—particularly when, as the
authors of the HTML5 specification hope, more and more of the appli-
cations you use every day are web applications. For a web application
to be available offline, there are two basic requirements:
A mechanism for storing the pages and other files (images, scripts,
and stylesheets) required by the application
A place to store the user's data as it's accessed and updated while the
user is offline
In this section, you'll learn about HTML5 technologies for the first of
these requirements: the application cache —a way of placing a copy of
your web app on your user's machine. In the following section, you'll
learn about the offline storage of data.
Search WWH ::

Custom Search