jpillora / xdomain

A pure JavaScript CORS alternative
https://jpillora.com/xdomain/
3.12k stars 270 forks source link

Re-using same XHR object for multiple requests doesn't work #120

Closed Blasz closed 9 years ago

Blasz commented 9 years ago

Vanilla xhr allows you to reuse the same xhr object for multiple requests, xdomain breaks this piece of functionality.

jpillora commented 9 years ago

I thought I replied to this one...

Interesting, didn't even know that was a thing. What's the benefit of using the same xhr object more than once? I've marked this as a bug as it should be supported by XHook.

Blasz commented 9 years ago

Sorry, I created an issue for both xdomain and xhook.

I'm not quite sure what the benefit is, I assume to minimise memory consumption when making a lot of synchronous requests. Regardless, some libraries use xhr objects this way such as https://github.com/scottjehl/Respond