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

  • Home
  • SEARCH
  • 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 7041713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:04:46+00:00 2026-05-28T02:04:46+00:00

This seems 101-level, but I can’t find an answer! (instead I find links to

  • 0

This seems 101-level, but I can’t find an answer! (instead I find links to what to do on success or failures, jQuery’s ajax().success and the like.

My hunch is:

  • success: 200 HTTP return code
  • failure: anything else.
  • 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-28T02:04:46+00:00Added an answer on May 28, 2026 at 2:04 am

    This is not really an AJAX, but jQuery question, because the success callback is only characteristic of jQuery, not AJAX on the whole.

    From the jQuery source you can see how it is implemented

    // If successful, handle type chaining
                if ( status >= 200 && status < 300 || status === 304 ) {
    
                    // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
                    if ( s.ifModified ) {
    
                        if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) {
                            jQuery.lastModified[ ifModifiedKey ] = lastModified;
                        }
                        if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) {
                            jQuery.etag[ ifModifiedKey ] = etag;
                        }
                    }
    
                    // If not modified
                    if ( status === 304 ) {
    
                        statusText = "notmodified";
                        isSuccess = true;
    
    ...
    else fail with the error callback
    

    So, basically if the HTTP response code is between 200 and 299 (inclusive) or 304 it goes for the success callback, otherwise, it is the error callback.

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

Sidebar

Related Questions

This seems like it's basic Spring 101 stuff, but I can't seem to find
This seems like a simple question, but I can't find it with the Stack
This is comp sci 101 stuff, but I couldn't find an answer applicable to
This seems to be a common problem but I cannot find a solution. I
Okay, so this seems simple, but I can't think of a straightforward solution; Basically
This seems like a pretty softball question, but I always have a hard time
This seems trivial, but I've never had to worry about it before and my
This might seem like a basic question and back to Http protocol 101. But
This may be better suited to Server Fault, but it seems more of a
This seems like it has to be a dupe but my SO-searching-fu is poor

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.