CONTENTS OF THIS FILE
---------------------
* Introduction
* Requirements
* Installation
* Configuration
* Maintainers
INTRODUCTION
------------
The Views Ajax Get module will make your ajax-enabled Views, use GET instead of
POST.
Why?
Because GET is much better for caching. If you're using something like Varnish,
or Boost, these (by default) will not store POST requests (and so they
shouldn't).
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 (this is sometimes
referred to as monkey-patching).
Also...
There are a couple of other reasons the Drupal Ajax framework uses POST. Which
have had to be removed when using GET:
To ensure valid HTML markup, every HTML id on the current page is sent with
the POST request. Drupal can then check it is not creating duplicate id's
(using drupal_html_id()). Sending every id in the request makes it too large
for GET. So this is removed.
To ensure an Ajax request can add new JS and CSS files to the current page,
the filename of every js and css file is sent with the request. These again
make the request too large for GET, and so is removed.
Note
If you are having any issues with a View because of this, you can set the View
to be exempt from using GET, by going to admin/config/system/views_ajax_get.
Also, if you are using Varnish with the Four Kitchens VCL, or something similar,
you will need to remove the following line
req.url ~ "^.*/ajax/.*$" ||
Otherwise, Varnish will not cache the Views Ajax responses.
* For a full description of the module visit:
https://www.drupal.org/project/views_ajax_get
* To submit bug reports and feature suggestions, or to track changes visit:
https://www.drupal.org/project/issues/views_ajax_get
REQUIREMENTS
------------
This module requires the following module:
* Views - https://drupal.org/project/views
INSTALLATION
------------
Install the Views Ajax Get module as you would normally install a contributed
Drupal module. Visit https://www.drupal.org/node/895232 for further information.
CONFIGURATION
-------------
* Once the Views Ajax Get module is enabled, all Views with Ajax enabled will
use GET instead of POST.
* If a View is having issues using GET ajax, you can have the view exempt from
using GET and revert it back to using POST. Note this will only apply to
Views that have ajax enabled.
This can be configured at Administration > Configuration > System > Views
Ajax Get Settings.
MAINTAINERS
-----------
Current maintainers:
* Leon Kessler (leon.nk) - http://drupal.org/user/595374
View source
- CONTENTS OF THIS FILE
- ---------------------
-
- * Introduction
- * Requirements
- * Installation
- * Configuration
- * Maintainers
-
-
- INTRODUCTION
- ------------
-
- The Views Ajax Get module will make your ajax-enabled Views, use GET instead of
- POST.
-
- Why?
- Because GET is much better for caching. If you're using something like Varnish,
- or Boost, these (by default) will not store POST requests (and so they
- shouldn't).
-
- 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 (this is sometimes
- referred to as monkey-patching).
-
- Also...
- There are a couple of other reasons the Drupal Ajax framework uses POST. Which
- have had to be removed when using GET:
-
- To ensure valid HTML markup, every HTML id on the current page is sent with
- the POST request. Drupal can then check it is not creating duplicate id's
- (using drupal_html_id()). Sending every id in the request makes it too large
- for GET. So this is removed.
-
- To ensure an Ajax request can add new JS and CSS files to the current page,
- the filename of every js and css file is sent with the request. These again
- make the request too large for GET, and so is removed.
-
- Note
- If you are having any issues with a View because of this, you can set the View
- to be exempt from using GET, by going to admin/config/system/views_ajax_get.
-
- Also, if you are using Varnish with the Four Kitchens VCL, or something similar,
- you will need to remove the following line
- req.url ~ "^.*/ajax/.*$" ||
- Otherwise, Varnish will not cache the Views Ajax responses.
-
- * For a full description of the module visit:
- https://www.drupal.org/project/views_ajax_get
-
- * To submit bug reports and feature suggestions, or to track changes visit:
- https://www.drupal.org/project/issues/views_ajax_get
-
-
- REQUIREMENTS
- ------------
-
- This module requires the following module:
-
- * Views - https://drupal.org/project/views
-
-
- INSTALLATION
- ------------
-
- Install the Views Ajax Get module as you would normally install a contributed
- Drupal module. Visit https://www.drupal.org/node/895232 for further information.
-
-
- CONFIGURATION
- -------------
-
- * Once the Views Ajax Get module is enabled, all Views with Ajax enabled will
- use GET instead of POST.
-
- * If a View is having issues using GET ajax, you can have the view exempt from
- using GET and revert it back to using POST. Note this will only apply to
- Views that have ajax enabled.
- This can be configured at Administration > Configuration > System > Views
- Ajax Get Settings.
-
-
- MAINTAINERS
- -----------
-
- Current maintainers:
-
- * Leon Kessler (leon.nk) - http://drupal.org/user/595374