I just tried to setup the RefreshLess module for my Drupal 8 site; after enabling it, I just see that some meta information is added to the DOM, but switching pages using links seems not to be effected in any way.

As written in the README file, I applied the patch to core.

How can I debug this?

PS: The refreshless.js file is not even loaded.


I was wondering the same and maybe this code is related:

function refreshless_page_attachments(array &$page) {
  $request = \Drupal::request();

  // Refreshless is only sensible when there is an actual session (otherwise the
  // entire page can be cached by the page_cache module, and be sent more
  // quickly than Refreshless could).
  // @see \Drupal\big_pipe\Render\Placeholder\BigPipeStrategy.
  $session_exists = \Drupal::service('session_configuration')->hasSession($request);

  $page['#cache']['contexts'][] = 'session.exists';
  if ($session_exists) {
    $page['#attached']['library'][] = 'refreshless/refreshless';

It could be that for anonymous user the library is not loaded at all(check the comments in the function).

However I am not 100% sure.

Update: if you log in, you can see that refreshless.js is loaded.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.