Drupal is a registered trademark of Dries Buytaert

ajax_placeholder

18 sites Security covered
View on drupal.org

The AJAX Placeholder module provides a render element that will defer loading the content to an AJAX request, similar to how lazy builders work. This can greatly improve the performance and caching of pages. The main benefit over lazy builders and Bigpipe, is that the AJAX request will load asynchronously which will significantly improve the user experience when lots of render elements are placed on the same page.

Features

The module provides a new render element to load content via AJAX:

  $build['awesome'] = [
    '#type' => 'ajax_placeholder',
    '#callback' => ['mymodule.service:callback', [$arg1, $arg2]],
  ];

The module requires no configuration, and can be used by developers to improve the performance of pages that show lots of different content that can be hard to cache (like dashboards).

Activity

Total releases
2
First release
Jan 2025
Latest release
8 months ago
Release cadence
125 days
Stability
100% stable

Releases

Version Type Release date
1.0.2 Stable Jun 5, 2025
1.0.1 Stable Jan 31, 2025