One ajax call or two simultaneous calls? Which is faster?
pedalpete: I was considering a similar issue not long ago and decided on one call for the following reasons
1) user percieved speed - I can't control the users bandwidth, or memory, and two ajax calls means two pages being retrieved by the users browser, and then two different functions to place those pages into the users browser
2) error handling - what if there is an error with the image or comments? the user will get one portion returned, and not the other (minor disconnects happen all the time and usually it isn't detrimental, but the more ajax calls, the more opportunity for failure).In the end I decided to do one ajax call and the split the returned data into two strings and place them on the page.You can check out the results at www.HearWhere.comAlso, if you are always getting the image with related comments, I would suspect that they would both go within the same area/div of a page, so why split them?