Modify ↓
Ticket #381 (closed feature: fixed)
Document global ajax settings
| Reported by: | joern | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.1a |
| Component: | ajax | Version: | 1.1a |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
By moving the defaults into a global object, clients could modify these defaults for all following requests. This is already available for timeout, but would be useful for other options, too.
Setting timeout is currently wrapped inside it's own method, that makes it easy to integrate the global timeout setting into the other defaults without breaking the API.
Change History
comment:3 Changed 6 years ago by joern
- Introducde jQuery.ajaxSettings or something similar, contains all defaults currently defined in jQuery.ajax
- modify ajaxTimeout() to set jQuery.ajaxSettings.timeout instead of jQuery.timeout
- modify jQuery.ajax: s = jQuery.extend({}, jQuery.ajaxSettings, s);
- introducde ajaxSetup() or similar: ajaxSetup: function(settings) { jQuery.extend(jQuery.ajaxSettings, settings); }
- add test for ajaxSetup
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Hijacking Version 1.0 for anything scheduled for 1.1.