You are here

README.txt in Views Ajax Get 7

Same filename and directory in other branches
  1. 8 README.txt
  2. 2.0.x README.txt
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

File

README.txt
View source
  1. CONTENTS OF THIS FILE
  2. ---------------------
  3. * Introduction
  4. * Requirements
  5. * Installation
  6. * Configuration
  7. * Maintainers
  8. INTRODUCTION
  9. ------------
  10. The Views Ajax Get module will make your ajax-enabled Views, use GET instead of
  11. POST.
  12. Why?
  13. Because GET is much better for caching. If you're using something like Varnish,
  14. or Boost, these (by default) will not store POST requests (and so they
  15. shouldn't).
  16. Views uses the Drupal Ajax framework. This by default uses POST.
  17. While a lot of Ajax inside of Drupal requires POST (think the Views UI, for
  18. example), a view itself doesn't. If you disable Ajax on a View, it will use
  19. GET anyway.
  20. How?
  21. This module overrides a core Drupal Ajax JavaScript function (this is sometimes
  22. referred to as monkey-patching).
  23. Also...
  24. There are a couple of other reasons the Drupal Ajax framework uses POST. Which
  25. have had to be removed when using GET:
  26. To ensure valid HTML markup, every HTML id on the current page is sent with
  27. the POST request. Drupal can then check it is not creating duplicate id's
  28. (using drupal_html_id()). Sending every id in the request makes it too large
  29. for GET. So this is removed.
  30. To ensure an Ajax request can add new JS and CSS files to the current page,
  31. the filename of every js and css file is sent with the request. These again
  32. make the request too large for GET, and so is removed.
  33. Note
  34. If you are having any issues with a View because of this, you can set the View
  35. to be exempt from using GET, by going to admin/config/system/views_ajax_get.
  36. Also, if you are using Varnish with the Four Kitchens VCL, or something similar,
  37. you will need to remove the following line
  38. req.url ~ "^.*/ajax/.*$" ||
  39. Otherwise, Varnish will not cache the Views Ajax responses.
  40. * For a full description of the module visit:
  41. https://www.drupal.org/project/views_ajax_get
  42. * To submit bug reports and feature suggestions, or to track changes visit:
  43. https://www.drupal.org/project/issues/views_ajax_get
  44. REQUIREMENTS
  45. ------------
  46. This module requires the following module:
  47. * Views - https://drupal.org/project/views
  48. INSTALLATION
  49. ------------
  50. Install the Views Ajax Get module as you would normally install a contributed
  51. Drupal module. Visit https://www.drupal.org/node/895232 for further information.
  52. CONFIGURATION
  53. -------------
  54. * Once the Views Ajax Get module is enabled, all Views with Ajax enabled will
  55. use GET instead of POST.
  56. * If a View is having issues using GET ajax, you can have the view exempt from
  57. using GET and revert it back to using POST. Note this will only apply to
  58. Views that have ajax enabled.
  59. This can be configured at Administration > Configuration > System > Views
  60. Ajax Get Settings.
  61. MAINTAINERS
  62. -----------
  63. Current maintainers:
  64. * Leon Kessler (leon.nk) - http://drupal.org/user/595374