AJAX

AJAX

Test your AJAX knowledge with free quizzes on MyCodeSkills covering core concepts.


  1. What does AJAX stand for?

    • Advanced JavaScript and XML
    • Asynchronous JavaScript and XML
    • Automated Java Application Extension
    • Asynchronous Java App Exchange
  2. Which JavaScript object is used to send AJAX requests?

    • JSON
    • AJAXObject
    • XMLHttpRequest
    • WebRequest
  3. Which method is used to open a connection in AJAX?

    • connect()
    • open()
    • initialize()
    • begin()
  4. What method sends the request to the server?

    • load()
    • sendRequest()
    • post()
    • send()
  5. What does readyState == 4 indicate?

    • Error
    • Server timeout
    • Request completed
    • Request started
  6. What is the main purpose of AJAX?

    • Data encryption
    • Asynchronous data transfer
    • Form validation
    • UI design
  7. Which HTTP method is commonly used with AJAX for sending data?

    • GET
    • FETCH
    • POST
    • PUT
  8. Which JavaScript object is used to make AJAX requests?

    • XMLHttpRequest
    • AjaxEngine
    • HttpHandler
    • DOMRequest
  9. Which function is triggered when an AJAX request completes successfully?

    • onOpen
    • onSuccess
    • onComplete
    • onreadystatechange
  10. What does the 'readyState' value of 4 indicate in AJAX?

    • Request not sent
    • Request received
    • Request processing
    • Request finished and response ready
  11. What is the purpose of JSON Web Tokens (JWT) in AJAX requests?

    • Compress data
    • Authorize users
    • Cache responses
    • Format HTML
  12. Which header is typically used to send JWT in an AJAX request?

    • X-JWT
    • Authorization
    • Auth-Token
    • JWT-Header
  13. How can you monitor file upload progress in AJAX?

    • By using onprogress event
    • By using onerror event
    • By using onsubmit event
    • By using onloadstart only
  14. What method is used to cancel an AJAX request in jQuery?

    • $.ajax.cancel()
    • xhr.abort()
    • $.stop()
    • $.ajax.stop()
  15. Which HTTP status code indicates a CORS issue?

    • 200
    • 403
    • 401
    • 0