AngularJS interview questions


- Advertisement -

1) What is AJAX?

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

2) What are the advantages of AJAX?

- Advertisement -

  • 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
  • Javatpoint
  • 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.

7) What are the technologies used by AJAX?

  • DOM
  • XML
  • XMLHttpRequest
  • JavaScript

8) What does XMLHttpRequest?

  • sends data in the background
  • receives data
  • updates data without reloading the page

9) What are the properties of XMLHttpRequest?

The important properties of XMLHttpRequest object are given below.

  • onReadyStateChange
  • readyState
  • responseText
  • responseXML

- Advertisement -

10) What are the important methods of XMLHttpRequest?

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

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
  • 3 means LOADING
  • 4 means DONE

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.

- Advertisement -

Leave A Reply

Your email address will not be published.

Copy Protected by Chetan's WP-Copyprotect.