something like this:
var start_ts;
$.ajax({
type: "GET",
url: "http://localhost/thescript.php",
beforeSend: function() {
start_ts = new Date().getTime();
}
success: function(data){
$("#container").html(data);
},
complete: function(jqXHR, textStatus){
var end_ts = new Date().getTime();
var dif = (end_ts - start_ts) / 1000; /* convert milisec to sec */
alert("http://localhost/thescript.php took '"+dif+"' seconds to load");
}
});