JavaScript AJAX Basics (retiring) AJAX Concepts A Simple AJAX Example

Jesse Dispoto
Jesse Dispoto
Front End Web Development Techdegree Graduate 14,537 Points

Is using jQuery for AJAX the preferred method? The way in the video seems convoluted and confusing

The way in the video seems convoluted and confusing, especially for doing so little with the request (or so it seems). On a larger scale, is using jQuery more acceptable?

2 Answers

Steven Parker
Steven Parker
176,821 Points

Once you've used jQuery to do AJAX, you'll never think of doing it with primitive calls again.

But there's also the Fetch API that brings the simplicity of jQuery to native JS. The only downside I can think of to Fetch is that it does not transparently handle certain CORS (security) situations like jQuery does.

Jesse Dispoto
Jesse Dispoto
Front End Web Development Techdegree Graduate 14,537 Points

great, thanks for the explanation Steven Parker. I've used the jQuery method before when I was learning some basic js on my own, so this way in vanilla js was new to me. Is using the jQuery method (and/or Fetch API) the preferred method these days? I know jQuery is not as much of a sought-after skill as it was years ago, so I'm wondering (in the employment world) is it okay if one uses those 2 methods as opposed to doing it in vanilla JS?

Steven Parker
Steven Parker
176,821 Points

I was trying to say I doubt anyone does it for real without jQuery or Fetch. I certainly don't.

And Fetch is "vanilla" JS — now.

But I'm curious about where you heard "jQuery is not as much of a sought-after skill"... ? It's a crucial component of some of the most popular frameworks around.

Steven mudie
Steven mudie
4,741 Points

also wondering if ajax is still relevant with a modern web stack as it says this course is getting retired in a month?