3 ms·
I guess I don't really understand the question. You're loading text based content, and an image, and you want to know whether or not to get everything in one XM
by boucher 18y ago
I guess I don't really understand the question. You're loading text based content, and an image, and you want to know whether or not to get everything in one XMLHTTPRequest, or to load two separate XMLHTTPRequests?
Why do you need a request at all for the image? If you've got the information you need and predictable URLs, you could use one XMLHTTPRequest, and simultaneously create an image in JavaScript and set it's source, right? This will obviously be faster than first going to your server, then creating the image in the resulting html. Of course, if you can't actually generate the image tag without hitting your server, then this is all moot.