The RefreshLess Module Brings Turbolinks to Drupal 8

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

Author

0 0 votes
Article Rating
Subscribe
Notify of
5 Comments
Oldest
Newest
Inline Feedbacks
View all comments
pepperstreet
7 years ago

Mmh… maybe about time to switch to Drupal! 😉

marcvangend
marcvangend
7 years ago

Thanks Daniel. Using the name “Turbolinks” turned out to be a sensitive topic. Perhaps you could rephrase the title and the sentence “With Turbolinks, Drupal 8 only requests…” so it is even clearer that this does not “bring Turbolinks to Drupal 8”, but is instead custom code inspired by Turbolinks.

steve
steve
7 years ago
Reply to  marcvangend

@marcvangend Sure thing, I’ve updated that for you. It’s a shame that the original users of the name were so pedantic.

marcvangend
marcvangend
7 years ago
Reply to  steve

Well they did invest a lot of hours in the software, so I guess they have every right to protect the name. Anyway, thanks for the edit. Time to focus on the content again 🙂

kamal
kamal
6 years ago

I get error with version 8.x-1.0-alpha3 :

Drupal.AjaxError {message: “↵An AJAX HTTP error occurred.↵HTTP Result Code: 20…er/MainContent/RefreshlessRenderer.php on line 85”, name: “AjaxError”}

5
0
Would love your thoughts, please comment.x
()
x