O'Reilly logo

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

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required