O'Reilly logo

The Rails 5 Way, Fourth Edition by Kevin Faustino, Obie Fernandez

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 22 Action Cable

Action Cable provides an easy way to add real-time, low-latency communication between the browser and your Rails 5 server backend, using a technology called web sockets. It eliminates the need for Ajax polling, or old-school, brute-force methods like this classic webmaster technique:

<meta http-equiv="refresh" content="5" />

Most importantly, it is well integrated into the rest of Rails and follows its conventions in a way that feels natural. DHH formally introduced it in his 2015 Railsconf keynote, alongside Rails API mode—both innovations represent ways that Ruby on Rails is staying relevant in the face of competition from the likes of React, Angular, and Firebase.

22.1 Web Sockets

Web ...

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