Skip to Main Content
Write Modern Web Apps with the MEAN Stack: Mongo, Express, AngularJS, and Node.js
book

Write Modern Web Apps with the MEAN Stack: Mongo, Express, AngularJS, and Node.js

by Jeff Dickey
September 2014
Intermediate to advanced content levelIntermediate to advanced
256 pages
5h 25m
English
Peachpit Press
Content preview from Write Modern Web Apps with the MEAN Stack: Mongo, Express, AngularJS, and Node.js

Chapter 9. Pushing Notifications with WebSockets

In this chapter, you’ll learn how to make applications more interactive by adding WebSockets. WebSockets allow you to push live changes from a server into a browser.

Introducing WebSockets

In the interest of finding ways to develop more interactive, more immersive applications, browsers now support a new protocol in addition to HTTP: WebSockets. HTTP was pretty much the only way for developers to communicate with browsers for a long time. It’s a reliable, relatively quick protocol that developers got by with.

The major downside to HTTP is that it’s one-way for web applications. The browser cannot be an HTTP server, which means that the client must initiate any communication. This works well for ...

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.
Start your free trial

You might also like

Node.js, MongoDB, and AngularJS Web Development

Node.js, MongoDB, and AngularJS Web Development

Brad Dayley

Publisher Resources

ISBN: 9780133962369Purchase book