The .ajax() request has an option called 'xhr'. I am trying to grab
the filesize of a file (html)  being requested with ajax. I think that
the method used with XHR is getResponseHeader. How would I implement
this into the 'xhr' option?

I have tried several ways, but all gave me errors on Firebug, such as
that getResponseHeader was not defined.

$.ajax({
...
...
xhr: function(){
alert(  this.getResponseHeader('Content-Length'));
},
...
ect


I have tried this.getResponseHeader('Content-Length'),
xhr.getResponseHeader('Content-Length'), and getResponseHeader
('Content-Length') by itself, but no luck so far.

If I am way off and incorrect, what would be the best way to see if
somehow the file I'm loading has changed (file size, last modified,
ect) from the last request?

Reply via email to