On demand of many readers, i have started to write on various interview questions answers.This post contains some very basic and useful ajax interview questions and answers.These questions are the suggestions from the beginners who faced various interviews and some of them are added by me.
(1) What is Ajax?
This technique is used to make internet faster and user friendly. It is not a programming language.
(2) What are Ajax applications?
Ans: Browser based applications and platform independent applications are used by Ajax.
(3) What are the advantages of Ajax?
Ans: Following are the advantages of Ajax:
- Bandwidth utilization
- It saves memory when the data is fetched from the same page.
- More interactive
- Speeder retrieval of data
(4) What are the disadvantages of Ajax?
Ans: Following are the disadvantages of Ajax:
- Source code written in AJAX is easily human readable. There will be some security issues in Ajax.
- Debugging is difficult (not impossible)
- Increases size of the requests
- Slow and unreliable network connection.
- Problem with browser back button when using AJAX enabled pages.
(5) What are all the technologies used by Ajax?
Ans: AJAX uses following technologies:
- Document Object Model (DOM)
- Extensible HTML (XHTML)
- Cascading Style Sheets (CSS)
(6) What Is the Format of an AJAX Request?
Ans: An AJAX request can be in any format:
- Text File
- JSON object
(7) How many types of triggers are present in update panel?
Ans : There are two types of triggers used in update panel:
- PostBackTrigger : This works as full postback and it cannot work asynchronously
- AsyncPostBackTrigger : Partial post back asynchronously
(8) Is an AJAX Request Synchronous or Asynchronous?
Ans: AJAX requests are asynchronous by nature, which means that they should run in the background independently of other events.
(9) What are the security issues with AJAX?
Ans: The Ajax calls are sent in plain text format, this might lead to insecure database access. The data gets stored on the clients browser, thus making the data available to anyone. It also allows monitoring browsing sessions by inserting scripts.
(10) Is AJAX code cross browser compatible?
(11) What are all the browsers support AJAX?
Ans: Following browsers support AJAX:
- Internet Explorer 5.0 and above
- Opera 7.6 and above
- Netscape 7.1 and above
- Safari 1.2 and above
(12) How can you test the Ajax code?
(13) How can you find out that an AJAX request has been completed?
Ans : ReadyState property is used to check whether AJAX request has been completed. If the property is equal to four, then the request has been completed and data is available.
(14) What is JSON in Ajax?
(15) What are all the different data types that JSON supports?
Ans: JSON supports following data types:
This list is not going to end... Please provide other QA that you know or you have faced in any interviews.Your suggestions will be appreciated.