I need to access the size of response message I am getting from another machine (cross-domain request) using $.getJSON, although I can see the request and response in chrome console, it does not work. Here is my request code:
xhr=$.getJSON('http://192.168.1.102/server/server.php?callback=?',
{data:array}, function(res){
alert(xhr.getAllResponseHeader());
},
type='json');
when running I get "Uncaught TypeError: Object # has no method 'getAllResponseHeader' " error. When I use
alert(xhr.getResponseHeader("Content-Length"));
I get "null".
Please consider that I am using cross-domain get.