| | 201 | |
|---|
| | 202 | ``is_ajax()`` |
|---|
| | 203 | **New in Django development version** |
|---|
| | 204 | |
|---|
| | 205 | Returns ``True`` if the request was made via an XMLHttpRequest by checking |
|---|
| | 206 | the ``HTTP_X_REQUESTED_WITH`` header for the string *'XMLHttpRequest'*. The |
|---|
| | 207 | following major Javascript libraries all send this header: |
|---|
| | 208 | |
|---|
| | 209 | * jQuery |
|---|
| | 210 | * Dojo |
|---|
| | 211 | * MochiKit |
|---|
| | 212 | * MooTools |
|---|
| | 213 | * Prototype |
|---|
| | 214 | * YUI |
|---|
| | 215 | |
|---|
| | 216 | If you write your own XMLHttpRequest call (on the browser side), you will |
|---|
| | 217 | have to set this header manually to use this method. |
|---|