This module will make your ajax-enabled Views, use GET instead of POST.
Why?
Because GET is much better for caching. Typically, CDN's or reverse-proxies like Varnish will not store POST requests.
Views uses the Drupal Ajax framework. This by default uses POST.
While a lot of Ajax inside of Drupal requires POST (think the Views UI, for example), a view itself doesn't. If you disable Ajax on a View, it will use GET anyway.
How?
This module overrides a core Drupal Ajax JavaScript function.
@See #956186: Allow AJAX to use GET requests which is an issue to bring this functionality into core, without the need for overriding in the way that this module does.
Note:
Drupal sends additional data in the POST request about the current page state. This includes a list of all the libraries included on the current page, as well as the current theme. Because of the size this can make the request can be too large when using GET, they are not included when using a GET request.
Currently the only known issue this causes is when using a theme that is not the site's default. See #2938055: Rendering does not use correct nondefault theme for anonymous
Drupal 8/9
Setup instructions
- Once this module is enabled, enable the Views ajax get display extender (/admin/structure/views/settings/advanced)
- Enable on each view by editing the "Use AJAX" setting, and enabling GET.
Project information
Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed.Obsolete
Use of this project is deprecated.- Project categories: Performance
544 sites report using this module
- Created by leon kessler on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
