This module has undergone a complete rewrite for security reasons. Please test the latest 7.x-2.0-betaX release below. Modules that already have integration with the 7.x-1.x API, you will need to re-integrate your callback to provide a token at the very least. There is currently no "upgrade" path. If you have questions, find a bug or have a feature request please file an issue.
This project targets module developers and provides a "bare bone" callback handler which is intended to be addressed by modules wanting to improve response times for specialized tasks.
Background and purpose
Drupal handles all requests - except those for public files - involving a standardized and complex bootstrap and database logic. Although that makes sense in most classic REST requests and is highly recommended for standard tasks due to caching and security reasons, it may cause a lot of performance cost on well frequented sites with much AJAX functionality.
JS does not really do anything itself but instead provides an API to other developers who want to improve their project's AJAX (, SOAP, AHAH, JSON etc) performance. This is mainly achieved with bypassing a lot of Drupal core functions which are not needed in every case, and by allowing to determine which core functionality will be loaded on a per-request base.
Think of a module which is only used for signaling that a user is still on your site. You might want to implement a JS interval who frequently tells the server "hi, this is session X with session cookie Y telling you that I'm still alive". You would not need any localization, forms API or theme engine involved to handle such a request properly, but think of the server load such a function would cause with some 100 users hailing every, say, 10 seconds using a complete Drupal request.
ab -n20 -c1 http://example.com/index.php?q=js/mymodule/callback Requests per second: 2.24 [#/sec] (mean) Time per request: 446.846 [ms] (mean)
ab -n20 -c1 http://example.com/js.php?q=js/mymodule/callback Requests per second: 16.84 [#/sec] (mean) Time per request: 59.371 [ms] (mean)
- Your server must support URL rewrites. E.g. in Apache, you need mod_rewrite enabled.
- Clean URLs need to be activated in your Drupal setup.
|Barracuda||✔︎||GH Issue #586|
|IP Geolocation Views & Maps||✔︎|
You can find an excellent post about the JS module (with an example) by another Drupal enthusiast here:
Authors of the 7.x branch and maintainers as of 6.x-1.0:
Authors of the pre-6.x-1.0 releases:
This project has been sponsored by:
- Full service Drupal specialist. From custom made webapplications to content management systems, intranet and e-commerce shops.
- UNLEASHED MIND
- Specialized in consulting and development of Drupal powered sites, our services include installation, development, theming, customization, and hosting to get you started.
- Maintenance status: Actively maintained
- Development status: Under active development
- Reported installs: 1,651 sites currently report using this module. View usage statistics.
- Downloads: 125,679
- Last modified: June 30, 2016
- Stable releases are covered by the security advisory policy.
Look for the shield icon below.