Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Maxwell DeMers
Maxwell DeMers
6,853 Points

Should you make a new XMLHTTPRequest object for each AJAX request you make? Or can you recycle them somehow?

I was just wondering what the best practice is for this. I would specifically like to know if making a constructor function would be the best way to make multiple requests, and also, how that would look.