var base = 'http://chat.stackoverflow.com';
function genReq( count ){
var r = new XMLHttpRequest;
r.onload = function(){
console.log( count );
genReq( ++count );
};
var str = base;
for( var i = 0; i < count; ++i )
base += '/'; r.open( 'GET', str );
r.send();
}
genReq( 0 );