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 21 Turbolinks

Turbolinks is a JavaScript library that, when enabled, attaches a click handler to all links of an HTML page. When a link is clicked, Turbolinks will execute an Ajax request, and replace the contents of the current page with the response’s <body> tag.

When Turbolinks is activated, it uses the HTML5 History API to dynamically change the address of the current page, enabling users to bookmark a specific page and use the back button as they normally would.

The biggest advantage of Turbolinks is that it enables the user’s browser to only fetch the required stylesheets, JavaScripts, and even images once to render the page. Turbolinks effectively makes your site appear faster and more responsive.

Turbolinks is automatically included ...

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