viji
viji

Reputation: 2926

Is it possible to get the global settings for Ajax requests in jQuery?

I've called $.ajaxSetup() to set some parameters.

Later I wanna get a particular setting's value (say timeout).

Is it possible to get that ?

Upvotes: 0

Views: 39

Answers (1)

Christian Stewart
Christian Stewart

Reputation: 15519

Yes, you can do the following

$.ajaxSetup()['timeout']

AjaxSetup returns an object, from which you can query any property, (for example timeout or cache).

Upvotes: 3

Related Questions