Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6601949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:49:07+00:00 2026-05-25T18:49:07+00:00

I have found this information on the web about jquery ajax requests. load() :

  • 0

I have found this information on the web about jquery ajax requests.

load(): Load a piece of html into a container DOM.

$.getJSON(): Load a JSON with GET method.

$.getScript(): Load a JavaScript.

$.get(): Use this if you want to make a GET call and play extensively with the response.

$.post(): Use this if you want to make a POST call and don’t want to load the response to some container DOM.

$.ajax(): Use this if you need to do something when XHR fails, or you need to specify ajax options (e.g. cache: true) on the fly.

But it doesn’t say anything about performance which is best for using it for what. Which is best for from validation? Which is best in speed and such alike.

I have never used jQuery ajax before and wondered from some of you more experienced programmers in your time of using jQuery ajax requests which have your find suit your needs best?

What is JSON I know it is called javascript object notation but what does mean?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:49:08+00:00Added an answer on May 25, 2026 at 6:49 pm

    Like kingjiv said, each and every one of those go through the $.ajax method.

    load() sets the type to get/post does other things in the background to make sure that the response is populated on the selected element then calls $.ajax. Below is the code.

    load: function( url, params, callback ) {
        if ( typeof url !== "string" && _load ) {
            return _load.apply( this, arguments );
    
        // Don't do a request if no elements are being requested
        } else if ( !this.length ) {
            return this;
        }
    
        var off = url.indexOf( " " );
        if ( off >= 0 ) {
            var selector = url.slice( off, url.length );
            url = url.slice( 0, off );
        }
    
        // Default to a GET request
        var type = "GET";
    
        // If the second parameter was provided
        if ( params ) {
            // If it's a function
            if ( jQuery.isFunction( params ) ) {
                // We assume that it's the callback
                callback = params;
                params = undefined;
    
            // Otherwise, build a param string
            } else if ( typeof params === "object" ) {
                params = jQuery.param( params, jQuery.ajaxSettings.traditional );
                type = "POST";
            }
        } // after this is calls $.ajax and passes in the parameters 
    

    $.getJSON(): This just calls $.get setting the dataType to json. $.get in turn calls $.ajax

    getJSON: function( url, data, callback ) {
            return jQuery.get( url, data, callback, "json" );
        }
    

    $.getScript(): You guessed it, just calls $.get and passes in the dataType as script.

    getScript: function( url, callback ) {
            return jQuery.get( url, undefined, callback, "script" );
        },
    

    $.get() & $.post(): These two methods call $.ajax as well.

    jQuery.each( [ "get", "post" ], function( i, method ) {
        jQuery[ method ] = function( url, data, callback, type ) {
            // shift arguments if data argument was omitted
            if ( jQuery.isFunction( data ) ) {
                type = type || callback;
                callback = data;
                data = undefined;
            }
    
            return jQuery.ajax({
                type: method,
                url: url,
                data: data,
                success: callback,
                dataType: type
            });
        };
    });
    

    In conclusion, use whatever is suited to the purpose, just depends on what you intend to do. The performance should be the same since you have seen they all go through $.ajax

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is silly, but I haven't found this information. If you have names of
I have found a number of articles such as this one that talk about
I have found huge amounts of information (ie, this ) on how to handle
I have found this project on Codeplex. http://www.codeplex.com/ProjNET I need to integrate this code
I have found this code for reverse geocoding: var point = new GLatLng (lat[1],long[1]);
I have always found this to be a very useful feature in Visual Studio.
I have just found this great tutorial as it is something that I need.
I have found myself doing this in my code to 'cache' the work done
I found this PHP code in an app I have to modify... $links =
I have found some info on the subject ( like this link) , but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.