News for hackers. Stuff that matters.
Re:Multiple Simultaneous Ajax Requests (with one callback) i... by taf2 on Friday February 14, 2014 @10:55AM (#7239169)

   $.when(
     // Get the css-tricks once
     $.get("http://css-tricks.com"),

     // get it twice
     $.get("http://css-tricks.com")
    ).then(function( csstricks1, csstricks2 ) {
      
      console.log( 'Fetched css tricks' );
  
      console.log( csstricks1, csstricks2 );
    });
csstricks1[0] is the content object and usually what you'll want - for example, if the response is json.
Re:Multiple Simultaneous Ajax Requests (with one callback) i... by sopooneo on Friday February 14, 2014 @09:07PM (#7242322)
Why would you fetch the same thing twice? Or is that just for you example and wouldn't be done in reality?
Re:Multiple Simultaneous Ajax Requests (with one callback) i... by zachrose on Friday February 14, 2014 @10:29PM (#7242542)
Just to be sure that one of them isn't corrupted.