In jQuery, if I abort an ajax call, is it loaded by the browser in full, and then dumped from memory and not event-handled? Or are just the headers loaded? In a more complex script I’m noticing that sometimes all the data is received before marked as aborted in Firefox/Firebug.
javascript:
var $ajax;
function fetch(){
if ($ajax && $ajax.statusCode != 200) $ajax.abort();
$ajax = $.ajax({
type: 'get',
data:{search:"term"},
dataType: 'json',
url: 'http://localhost/data.php',
success: function(_data){ },
});
}
fetch();
fetch();
data.php:
print 'naptime!';
sleep(2);
Resolved in comments! Thanks ZeSimon