The RefreshLess Module Brings Turbolinks to Drupal 8

| Drupal
The RefreshLess Module Brings Turbolinks to Drupal 8

Over the last few months, Drupal 8 developers have been working very hard to make the system faster.

Drupal 8.1 will include the BigPipe module, which implements ideas from Facebook.

Now Acquia is developing a new module inspired by the the Turbolinks technique, which was pioneered by Ruby on Rails. The idea behind Turbolinks is that you only refresh the parts of the page that have changed. 

The Drupal version of this is called RefreshLess.

Because of the way Drupal 8's architecture is designed, Drupal knows which parts of a page have changed when moving between internal pages. With RefreshLess, Drupal 8 only requests the parts that actually change.

Site menus are a very common example of this. You only really need to load a menu once. This minor change means less data used and increased response speed.

This video from demonstrates the difference in loading time:

When a page is loaded, it is rendered into blocks and placed within the regions on the page. RefreshLess reads the regions and those that change from page to page are updated. The blocks that do not change are left in place.

As you can see from the short video this is a noticable change in speed even for a small site. And unlike Turbolinks in Rails, you are not required to do any coding to add RefreshLess to your site.

Combined with the other speed boosting performance enhancements, Drupal 8 will definitely be faster than it's predecessor. This is a module you can probably expect to see bundled into core eventually.

About the author

Daniel is a web designer from UK, who's a friendly and helpful part of the support team here at OSTraining.