Forum Moderators: open
//get the xml files last modified date as a string:
var lastModified = xhr.getResponseHeader('Last-Modified');
//convert it to a date object and then to integer timestamp,
//number of milliseconds since jan 1, 1970 :
var lastModifiedTimeStamp = new Date(lastModified).getTime();
alert(lastModified +'\n'+ lastModifiedTimeStamp);
The question is: in the xhr object is there a field that contains the xml's url from which the object was built?
function MyXhr(url) {
this.xhr = //code to get the xhr object
this.url = url;
}
//go on to describe prototype methods which would access the xhr methods...
//....
//....
var someXhr = new MyXhr('someXmlFile.xml'); //someXhr will have a 'url' property as well as an 'xhr' one