trainingtrains Logo

91-9990449935

 0120-4256464

AJAX Interview Questions

A list of frequently asked AJAX interview questions and answers are given below.


1) What is AJAX?

AJAX stands for Asynchronous JavaScript and XML. It is a group of related technologies to display data asynchronously. More details...


2) What are the advantages of AJAX?

  • Quick Response
  • Bandwidth utilization
  • User is not blocked until data is retrieved from the server.

3) What are the disadvantages of AJAX?

  • Dependent on JavaScript
  • Security issues
  • Debugging is difficult

4) What are the real web applications of AJAX currently running in the market?

  • Twitter
  • Facebook
  • Gmail
  • trainingtrains
  • Youtube etc.

5) What are the security issues with AJAX?

  • AJAX source code is readable
  • Attackers can insert script into the system

6) What is the difference between synchronous and asynchronous requests?

Synchronous request blocks the user until response is retrieved whereas asynchronous doesn't block the user. More details...


7) What are the technologies used by AJAX?

  • HTML/XHTML and CSS
  • DOM
  • XML
  • XMLHttpRequest
  • JavaScript
More details...

8) What does XMLHttpRequest?

  • sends data in the background
  • receives data
  • updates data without reloading the page
More details...

9) What are the properties of XMLHttpRequest?

The important properties of XMLHttpRequest object are given below.

  • onReadyStateChange
  • readyState
  • responseText
  • responseXML
More details...

10) What are the important methods of XMLHttpRequest?

  • open()
  • send()
  • setRequestHeader()
More details...

11) What is JSON in AJAX?

JSON stands for JavaScript Object Notation. It is easy to understand and data exchange is fast than XML. It supports array.


12) What are the tools for debugging AJAX applications?

There are two most widely used tools for debugging AJAX applications.

  • Firebug for Mozilla Firefox
  • Fiddler for IE (Internet Explorer)

13) What are the types of post back in AJAX?

There are two types of post back in AJAX.

  • Synchronous Postback
  • Asynchronous Postback

14) What are the different ready states of a request in AJAX?

There are 5 ready states of a request in AJAX.

  • 0 means UNOPENED
  • 1 means OPENED
  • 2 means HEADERS_RECEIVED
  • 3 means LOADING
  • 4 means DONE
More details...

15) What are the common AJAX frameworks?

  • Dojo Toolkit
  • YUI
  • Google Web Toolkit (GWT)
  • Spry
  • MooTools
  • Prototype

16) How can you test the AJAX code?

JsUnit is the open source unit testing framework for client side JavaScript. It is a part of JUnit.


17) What is the difference between JavaScript and AJAX?

JavaScript makes a request to the server and waits for the response. It consumes more bandwidth as it reloads the page.

AJAX sends a request to the server and doesn't wait for the response. It doesn't reload the page so consumes less bandwidth.