×

Top 30 AJAX Interview Questions for 2024

1) What is AJAX?

AJAX (Asynchronous JavaScript and XML) create better, faster and interactive web-apps. It provides data transfer between web-server and browser.

2) List some advantages of AJAX

Advantages are:
  1. More Interactive: Very quick in response.
  2. Bandwidth Utilization: When some data is fetched from some page it saves memory.
  3. Fast Retrieval of data: User is not blocked until the data is retrieved from server.

3) List some disadvantages of AJAX

Disadvantages are:
  1. Network Connection is slow and unreliable.
  2. Debugging of code is difficult.
  3. It is dependent on JavaScript.

4) Enlist some Web Application running on AJAX.

  • Google
  • Facebook
  • YouTube
  • Gmail
  • Twitter

5) What are security issues with AJAX?

  • We can view AJAX source code.
  • Script can be embedded into the system.

6) Describe Synchronous and Asynchronous request in AJAX?

Synchronous Request- In this browser is not unresponsive but blocks the client until operation is complete. JavaScript engine is blocked of the browser. Asynchronous Request-In this browser is responsive i.e. does not block the client. JavaScript engine in not blocked which allows user to perform different task as whole page is not refreshed.

7) Enlist technologies used by AJAX.

  • JavaScript
  • CSS
  • DOM
  • XHTML
  • XMLHttpRequest

8) What is XMLHttpRequest?

It is an API for JavaScript where the HTTP/HTTPS request is send to the web server and load its response into script.

9) Write different types of property of XMLHttpRequest?

  • onReadyStateChange
  • readyState
  • responseText
  • responseXML

10) Enlist all method of XMLHttpRequest.

  • open()
  • send()
  • setRequestHeader()

11) Describe JSON in AJAX?

JSON (JavaScript Object Notation) in JavaScript it is secure and reliable data exchange format which is easy to understand for both user and machine.

12) Enlist tool for debugging in AJAX.

  • APTANA- IDE is free, open source, cross platform.
  • Firebug- for Mozilla Firefox
  • Fiddler- for Internet Explorer
  • MyEclipse AJAX Tool
  • Script Debugger

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

Post Back is of 2 types
  1. Synchronous Post Back
  2. Asynchronous Post Back

14) Write all the ready state of a request in AJAX?

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

15) List some AJAX Frameworks.

  • jQuery
  • MOO Tools
  • Prototype
  • YUI Library
  • AngularJS
  • Google Web Tool Kit

16) How can we test AJAX Code?

We can test the code by using open source unit testing framework i.e. JsUnit.

17) Give all controls of Ajax.

  • Pointer
  • ScriptManager
  • ScriptManagerProxy
  • Timer
  • UpdatePanel
  • UpdateProgress

18) Give methods for cross domain AJAX call.

There are 2 methods
  • CORS (Cross Origin Resource Sharing)
  • JSONP (JavaScript Object Notation with Padding)

19) How to handle concurrent request in AJAX?

We handle concurrent request with the object AjaxInteraction(URL,callback) where JavaScript function is designed. It is designed in such a manner that it can handle concurrent request and call back function.

20) Give the difference between Proxied and Proxyless Call.

Proxied Call- We call through stub objects which can be call through PHP classes. Proxyless Call- We call through utility javascript function such as HTML_AJAX.replace() and HTML_AJAX.append().

21) Define Extender Controls in AJAX?

Extender Controls are used to enhanced the capabilities of ASP.NET. It uses block of JavaScript to add new and enhanced capabilities.

22) What is Script Manager?

Script Manager is used to manage the client side script. It is a mediator as AJAX depends on JavaScript.It is also used to enables AJAX libraries as every page that uses AJAX has Script Manager.

23) What are the protocols used by AJAX?

Protocols are as follows:
  • HTTP’s GET or POST
  • XMLHttpRequest for placing a request with the web server.
  • Uses JSON to communicate between the client and server.
  • UED or URL encoded data

24) How to handle Exception Handling?

In AJAX we handle exception by ErrorTemplatewhich is the child tag of script manager.

25) How many types of ready states in AJAX?

Types of ready states are as follows:
  • Initialization
  • Request
  • Process
  • Ready

26) Which request is better, GET or POST?

In AJAX HTTP GET request is more reliable as the data does not change for a given URL requested. HTTP POST should be used when state is updated on the server.

27) Can AJAX request be send to another domain?

No, in AJAX we cannot send AJAX request to another domain.

28) What values exists for the XmlHttpRequest.readyState field?

Ready State values are:
  • Uninitialize: 0
  • Loading: 1
  • Loaded: 2
  • Interactive: 3
  • Complete: 4

29) How do we know that an AJAX request has completed?

AJAX request is completed when XmlHttpRequest.readyState has 4 value and XMLHttpRequest.Status is 200.

30) Define the role of the Update Panel?

Update Panel is used to add functionality to the existing ASP.NET applications. By using partial page rendering, it can be used to update the content.

Related Topics

Top 15 Euphoria Interview Questions for 2024

1) What is Euphoria? Euphoria is a programming language. It is open source, powerful and easy to learn. It stands for End-User Programming with Hierarchical Objects for Robust Interpreted Applications 2) Who...

2 minutes read.

Top 15 Pure CSS Interview Questions for 2024

1) What is Pure CSS? Pure is a CSS (Cascading Style Sheet) framework. It is a collection of small set of responsive CSS modules. We can integrate it to any web...

5 minutes read.

Top 26 CouchDB interview questions for 2024

1) What is CouchDB? CouchDB is a document typed database server which can be accessed through RESTful JSON API. It is a schema free and Ad-hoc database with a flat address...

4 minutes read.

Top 15 Electron Interview Question for 2024

1) What is Electron? Electron is an open source library developed by Github. It is used to develop cross platform desktop application. 2) Which technology Electron uses? Electron uses Chromium and Node.js with...

3 minutes read.

Top 18 UiPath Interview Questions for 2024

RPA UiPath Interview Questions and Answers for Fresher  1. What is RPA? RPA is an acronym for Robotic Process Automation. Robotic In RPA, Robotic is termed as an entity or machine which tries to...

7 minutes read.

Top 31 Koa Interview Questions for 2024

1) What is Koa? Koa is a very small framework which provides us a minimal interface to build our applications. It is quite flexible and there are numerous modules available on...

4 minutes read.

Top 30 AJAX Interview Questions for 2024

1) What is AJAX? AJAX (Asynchronous JavaScript and XML) create better, faster and interactive web-apps. It provides data transfer between web-server and browser. 2) List some advantages of AJAX Advantages are: More Interactive: Very...

3 minutes read.

Top 16 Moo Tools Interview Questions for 2024

1) What is Moo Tools? MooTools stands for My Object-Oriented Tools. It is a lightweight and object-oriented JavaScript framework. It is used to create dynamic web page. It is developed by Valerio...

5 minutes read.

Ember.js Interview questions

1) What is Ember.js? Ember.js is a JavaScript front-end Framework. It provides developer both features for managing complexity in modern web-apps as well as integrated development kit. 2) Why choose Ember.js? Logical...

2 minutes read.

Top 15 Servlet Interview Questions for 2024

1) What is Servlet? It is a technology used to create web applications. It is a web component which is used to create dynamic web pages. It consists of many interfaces and classess...

2 minutes read.

Top 15 Data structure & Algorithm Interview Questions for 2024

1) What is Data Structure? Data structure is a way of storing, collecting and organizing data into the main memory. It makes data access more efficient and increase performance. Array, List, Queue...

3 minutes read.

Top 31 Flask Interview Questions for 2024

1) What is Flask? Flask is a micro web framework written in Python. It is based on Werkzeug toolkit and Jinja 2 template engine. 2) Who is the developer of Flask? Armin Ronacher...

6 minutes read.

Top 29 Pascal Interview Questions for 2024

1) What is Pascal? Pascal is a high-level and Algol-based language that was developed by Niklaus Wirth. It is used to develop efficient and reliable programs. 2) What are the features of Pascal? Features...

4 minutes read.

Top 10 WCF Interview Questions for 2024

  1. What is WCF? Windows Communication Foundation (WCF), earlier known by the name Indigo, is a run-time platform and a set of APIs in the .NET Framework for building, configuring, and...

7 minutes read.

Top 30 Web2py Framework Interview Questions for 2024

1) What is Web2py Framework? Web2py is an open source web application framework. It is written in the Python programming language. It allows web developers to design and develop dynamic web...

7 minutes read.

Top 48 C# Interview Questions for 2024

1) Write a program in C# to print "HELLO WORLD"? class Program         {          static void Main(string  args[])           {             System.Console.WriteLine(" HELLO WORLD ");             }          } 2) Write a program in C# to print "TutorialandExample" using namespace? Here, namespace is used to group related classes. Using System;    namespace  TutorialandExample      {         public class           {             public static void Main(string[]  args)             {              Console.WriteLine(" TutorialandExample ");             }          }       } 3) What are the...

8 minutes read.

Top 20 Java Programming Coding Interview Questions for 2024

Coding is an integral part of any programming language. It is the most important phase of an interview. Interviewee checks the capability of thinking of any particular. I think one...

13 minutes read.

Top 15 XML Interview Questions for 2024

1) What is XML? XML (eXtensible Markup Language) is designed to transport and store data. It has user executive tags i.e. no pre-defined tags used as in HTML. This language is...

2 minutes read.

Top 19 Google Maps Interview Questions for 2024

1) What is Google Maps? Google Maps is a web-based service developed by Google. It contains geographical information and provides routes and information to the client. 2) What are the features provided...

5 minutes read.

Top 29 Phalcon Framework Interview Questions for 2024

1) What is Phalcon? Phalcon is an open source framework based on the MVC (Model-View-Controller) pattern. It is the combination of PHP and C language. It is developed by Andres Gutierrez...

6 minutes read.