Ajax Interview Questions
1 .
How can AJAX applications be debugged ?
Two tools are used for debugging :
Fiddler for IE
Firebug for Mozilla.
2 .
How Ajax objects can be created ?
Following syntax can be used to create Ajax objects :

var sample = new ajaxObject(‘path of the page’)
3 .
What are the protocols used by Ajax ?
XMLHttpRequest for placing a request with the web server
Uses JSON to communicate between the client and server
UED or URL encoded data

4 .
What are the differences between AJAX and JavaScript ?
The differences between AJAX and JavaScript are given as follows :

AJAX sends request to the server and will not wait for the response.
It will allow other operations on the page before it get response of previous request; whereas, JavaScript make a request to the server, will waits for response and 

will not allow other operation on the page during that time.
In AJAX, the page will not get refreshed for downloading the whole page while JavaScript manages and controls a Web page after being downloaded.
By using AJAX we can minimize the overload on the server because the script needs to request once while JavaScript posts the request that updates the script each time.
5 .
What are Difference between Server-Side AJAX framework and Client-side AJAX framework ?
The server-side framework facilitates the developers to develop Ajax functionality, without gaining much knowledge of JavaScript.
This framework supports server controls and components as well as the drag and drop features.
This framework is usually preferred when you required to rapidly ajaxify an asp.net web page. The drawback is that a round trip will take place to the server to 

execute a client-side action.
The Client-Side Framework allows you to build web applications with rich user-interactivity as that of a desktop application.
It includes a set of JavaScript libraries, which is not dependent from ASP.NET. The functionalities of this library are enhanced in every release.
6 .
How we can send data to server using Ajax ?
We can use GET OR POST Method to send data.
7 .
Which request is better, Get or Post ?
AJAX requests should use an HTTP GET request where the data does not change for a given URL requested.

An HTTP POST should be used when state is updated on the server. This is highly recommended for a consistent web application architecture.
8 .
Which two methods are used for handling Cross-Domain AJAX Calls ?
Cross-domain means the ability to manually or automatically access or transfer data between two or more differing security domains.
Cross-Origin Resource Sharing (CROS) : Works with all HTTP verbs and most modern web browsers. Provides better support for error handling than JSONP.
JSON with padding (JSONP) : It only works with HTTP GET verb and on legacy browsers.
9 .
How ajax works?
User send request from a browser where JavaScript is enabled. XMLHttpRequest object receives call and sent it to server. Server retrieves data and sends XML or JSON data back to HMLHttpRequest callback function and data is shown to user on browser.
10 .
What are the controls of Ajax?
Ajax has following core controls.
* UpdatePanel
* UpdateProgress
* ScriptManager
* ScriptManagerProxy
* Timer control