HTML and CSS Reference
In-Depth Information
<audio> and <video> to pull in and assign the appropriate media type. Additionally, by
being semantic, HTML5 is more accessible, since screen readers can more easily read
its tags.
HTML5 is an umbrella term that covers the large number of improvements and
changes happening in web technologies, and includes everything from the markup you
use on your web pages to the CSS3 styling, offline and storage, multimedia, connectivity,
and so on. Figure 1-1 shows the different HTML5 feature areas.
Figure 1-1. HTML5 feature areas (W3C, 2011)
There are lots of resources that delve into these areas of HTML5. In this topic, we
focus on the Connectivity area, namely the WebSocket API and protocol. Let's take a look
at the history of HTML5 connectivity.
HTML5 Connectivity
The Connectivity area of HTML5 includes technologies like WebSocket, Server-Sent
Events, and Cross-Document Messaging. These APIs were included in the HTML5
specification to help simplify some of the areas where browser limitations prevented
web application developers from creating the rich behavior they desired or where web
application development was becoming overly complex. One example of simplification in
HTML5 is Cross-Document Messaging.
Before HTML5, communication between browser windows and frames was
restricted for security reasons. However, as web applications started to bring together
content and applications from different web sites, it became necessary for those
applications to communicate with each other. To address this, standards bodies and
major browser vendors agreed to support Cross-Document Messaging, which enables
secure cross-origin communication across browser windows, tabs, and iFrames. Cross-
Document Messaging defines the postMessage API as a standard way to send and receive
messages. There are many use cases for consuming content from different hosts and
domains—such as mapping, chat, and social networks—to communicate inside the web
Search WWH ::

Custom Search