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!
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
Can I just use vanilla JS for AJAX calls? Jquery is almost too easy.
Sounds strange, but writing all those lines of vanilla JS made more intuitive sense to me than Jquery, it's almost too simple... as strange as that may sound.
Is it fine if I proceed not to use Jquery for AJAX calls?
Steven Parker228,119 Points
Hi, I got alerted by your tag.
Coding AJAX can be a pain (or "challenge") using basic XMLHttpRequests. You might try it once or twice for a learning exercise, but I can't imagine you'd want to do that in general. The new "fetch" interface is about as easy to use as jQuery, but one advantage jQuery still has is that it recognizes and handles common CORS (security) issues that can be a problem with either the basic interface or fetch.
I'd probably favor "fetch" when there are no problems, and good old jQuery if there are CORS issues due to the server(s) not sending all the correct headers.
Johan Uribe2,677 Points
I was also wondering if jquery and Ajax were outdated technologies worth learning.