I have 2 questions.
Is it bad to have multiple AjaxSetups? Say I have 2 pages. One page need 5 options set and the other page needs 7(5 of them are the same as the first page). Could I just have 2 ajax setups instead of one? so I am not repeating the same options.
If you have an ajax setup option set and the same option set at the ajax request level($.ajax) which one would it take? Would it take the one set on the ajax request or the global one on the ajaxSetup?
Thanks
Nothing in the jQuery doc speak about your first question so I make a little test in http://jsfiddle.net/x6agm/1/ and according to the behavior:
$.ajaxSetup
calls and the properties modified in the first call, but not in the second call, will have the values imposed in the first call.$.ajax
object always overwrite the properties of $.ajaxSetup
.Sorry for my bad english, check the test for a better understand ^_^