Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Apr 2016
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Which came first AJAX or jQuery?

    I understand that jQuery provides an easier API to perform AJAX requests, which would otherwise be done by the XMLHttpRequest object.

    However, which came first? AJAX or jQuery?
    Did the name AJAX exist even pre-jQuery, or is AJAX the name given by jQuery to refer to creating an XMLHttpRequest object?

  2. #2
    Administrator VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    11,334
    Thanks
    7
    Thanked 1,362 Times in 1,331 Posts
    As in many cases, Wikipedia provides a good first source and start for further research.

  3. #3
    New to the CF scene
    Join Date
    Apr 2016
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by VIPStephan View Post
    As in many cases, Wikipedia provides a good first source and start for further research.
    VIPStephan, I'm sorry, couldn't get the answer from there. I had gone to the wiki page, and seen that AJAX came in a year and a half before jQuery.
    However, in a lot of web page, I keep seeing "jQuery's ajax". This has left me confused, as to whether it refers to jQuery's implementation of AJAX, or if it refers to AJAX by jQuery. If you could kindly confirm this detail, it would be awesome.

  4. #4
    New to the CF scene
    Join Date
    Apr 2016
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by VIPStephan View Post
    As in many cases, Wikipedia provides a good first source and start for further research.
    VIPStephan, I'm sorry, couldn't get the answer from there. I had gone to the wiki page, and seen that AJAX came in a year and a half before jQuery.
    However, in a lot of web page like here, I keep seeing "jQuery's ajax". This has left me confused, as to whether it refers to jQuery's implementation of AJAX, or if it refers to AJAX by jQuery. If you could kindly confirm this detail, it would be awesome.

  5. #5
    Administrator VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    11,334
    Thanks
    7
    Thanked 1,362 Times in 1,331 Posts
    It refers to jQuery’s own ajax() function which, as the article you linked to says right after that term you quoted “is just a wrapper around XMLHttpRequest” (i. e. the plain-JS way of doing an AJAX request). jQuery is a library that creates functions for easier use that, in the background, just use native JS methods. Simply spoken, $('#example') is a shortcut/wrapper for document.getElementById('example'). The reason they create a wrapper is that you can interact with this wrapper easier than with native JS (for example manipulating the element in question and altering the DOM).

    Likewise, jQuery’s ajax() function makes invoking and interacting with AJAX requests easier than the native method because it saves you the error checking for different implementations in different browsers and whatever, and you can concentrate on the actual task of loading and sending data. Whenever someone says “jQuery’s ajax” they mean the ajax function in jQuery, not the AJAX technique of sending and retreiving data itself.

  6. Users who have thanked VIPStephan for this post:

    PepperBoy123 (May 3rd, 2016)

  7. #6
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    9,249
    Thanks
    4
    Thanked 932 Times in 919 Posts
    Quote Originally Posted by PepperBoy123 View Post
    However, which came first? AJAX or jQuery?
    AJAX was introduced as a part of IE4 in September 1997 (although using an activeX call - the XMLHttpRequest version came much later).

    jQuery was introduced in August 2005.

    So AJAX had been around for almost eight years before jQuery was created.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •