$.ajax({
url: "http://ajaxhttpheaders.appspot.com",
dataType: 'jsonp',
success: function(headers) {
language = headers['Accept-Language'];
alert(language);
},
//it doesn't work
//timeout: 2000,
error: function() {
//wait for 2 sec..
//and if there are no response, do something..
}
});
I found timeout: 2000
option, but it doesn't work.