Can someone explain why i cant get the desired delay between each request? They are all happening at once.
$(window).load(function(){ $(\'a[href]\').
The loop is run just instantly and delay every execution of conectar function for 2000ms from the time code is exectued.
conectar
For simple case I'd use:
$('a[href]').each(function(idx){ ... window.setTimeout(function(){ conectar('HEAD', linkkhref, resp) }, idx*2000)