HTML5 Solutions: Essential Techniques for HTML5 Developers
by Marco Casario, Peter Elst, Charles Brown, Nathalie Wormser, Cyril Hanquez
Chapter 8. HTML5 Communication APIs
At this point in the book, it is already clear that HTML5 offers many new tools to create applications that interact in a more native manner with the server.
In this chapter, we look at the techniques and solutions for avoiding browser sandbox security limitations, and we use a new technique to create documents that communicate from different domains (cross-document messaging), which involves the use of the postMessage API. You will learn what Cross-Origin Resource Sharing (CORS) means and how to use it. Quite simply, CORS is a browser technology specification that defines ways for a web service to provide interfaces for sandboxed scripts coming from different domains under the same origin policy.
Next, we explore ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access