JavaScript AJAX Basics (retiring) jQuery and AJAX jQuery’s AJAX Shorthand Methods

Why plain JavaScript makes more sense?

I was following along completely fine with plain JS. Suddenly, the JQuery approach to AJAX sounds more confusing to me. Where is the .open('GET', 'whateverpage.html') and .send() portions of code in the JQuery approach?

1 Answer

Steven Parker
Steven Parker
177,538 Points

The beauty of jQuery for AJAX is that you don't have to do all those separate operations. The jQuery functions handle it all for you! It makes it way simpler.

Until recently, AJAX would always be a reason to load jQuery for me. Otherwise, I'd use it if it was already loaded for some other reason and write plain JavaScript if not.

I say recently because now there's "fetch". If you're not familiar with it, you might try the Working With the Fetch API after you finish your jQuery course.

I was starting to internalize the steps using plain JS and could write fluently without cheating and looking back to the videos. I think that being able to visualize the steps makes more sense to me. Well, I will work a bit to dominate the JQuery way to do things.

Thanks Steven!