Skip to main content

Using the Communication API and Web Sockets

  • Chapter
HTML5 Programming for ASP.NET Developers
  • 1364 Accesses

Abstract

So far in this book, you’ve learned about HTML5 features that require no server-side communication. Although you used some techniques such as jQuery $.ajax() to send and receive data between the client and the server, doing so wasn’t an integral part of the HTML5 feature being discussed. In this chapter, however, you learn about a few HTML5 features that are specifically designed to facilitate communication between the client browser and the server. Using these features, you can pass data to and from web pages from the same web application or from different applications. Additionally, some of these techniques provide one-way (client to server) communication, and others provide two-way (client to server and server to client) communication. Specifically, you learn about the following:

  • Cross-document messaging and Cross-Origin Resource Sharing (CORS)

  • Using the postMessage API to send data to documents from different web application

  • Using the new XMLHttpRequest Level 2 features to make GET and POST requests

  • Notifying the client using server-sent events

  • Performing two-way communication using Web Sockets

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 34.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 44.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Bipin Joshi

About this chapter

Cite this chapter

Joshi, B. (2012). Using the Communication API and Web Sockets. In: HTML5 Programming for ASP.NET Developers. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-4720-3_11

Download citation

Publish with us

Policies and ethics