Ajax Interview Questions and Answers
by Siyamala B, on Apr 6, 2018 2:30:38 PM
Q1. What is meant by Ajax?
This technique is used to make internet faster and user friendly. It is not a programming language.
Q2. What are Ajax applications?
Ans: Browser based applications and platform independent applications are used by Ajax.
Q3. What are the advantages of Ajax?
Ans: Following are the advantages of Ajax:
1. Bandwidth utilization
2.It saves memory when the data is fetched from the same page.
3. More interactive
4.Speeder retrieval of data
Q4. What is JSON in Ajax?
Q5. What are the disadvantages of Ajax?
Ans: Following are the disadvantages of Ajax:
3. Source code written in AJAX is easily human readable. There will be some security issues in Ajax.
4. Debugging is difficult (not impossible)
5. Increases size of the requests
6. Slow and unreliable network connection.
7. Problem with browser back button when using AJAX enabled pages.
Q6. What are all the technologies used by Ajax?
Ans: AJAX uses following technologies:
- Document Object Model (DOM)
- Extensible HTML (XHTML)
- Cascading Style Sheets (CSS)
Q7. Is AJAX code cross browser compatible?
Q8. 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.
Q9. How can you test the Ajax code?
Q10. What Is the Format of an AJAX Request?
Ans: An AJAX request can be in any format:
1. Text File
3. JSON object
Q11. Where Should I Start?
Q12. 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.
Q13. Does Ajax Work With Java?
Ans: Absolutely. Java is a great fit for AJAX! You can use Java Enterprise Edition servers to generate AJAX client pages and to serve incoming AJAX requests, manage server side state for AJAX clients, and connect AJAX clients to your enterprise resources. The JavaServer Faces component model is a great fit for defining and using AJAX components.
Q14. How many types of triggers are present in update panel?
Ans: There are two types of triggers used in update panel:
1.PostBackTrigger : This works as full postback and it cannot work asynchronously
2. AsyncPostBackTrigger : Partial post back asynchronously
Q15. 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
Q16. 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
Q18. Who Is Using Ajax?
Ans: Google is making a huge investment in developing the Ajax approach. All of the major products Google has introduced over the last year like Orkut, Gmail, the latest beta version of Google Groups, Google Suggest, and Google Maps are Ajax applications. (For more on the technical nuts and bolts of these Ajax implementations, check out these excellent analyses of Gmail, Google Suggest, and Google Maps.) Others are following suit: many of the features that people love in Flickr depend on Ajax, and Amazon’s A9.com search engine applies similar techniques.
These projects demonstrate that Ajax is not only technically sound, but also practical for real-world applications. This isn’t another technology that only works in a laboratory. Ajax applications can be any size, from the very simple, single-function Google Suggest to the very complex and sophisticated Google Maps.
At Adaptive Path, we’ve been doing our own work with Ajax over the last several months, and we’re realizing we’ve only scratched the surface of the rich interaction and responsiveness that Ajax applications can provide. Ajax is an important development for Web applications, and its importance is growing. The biggest challenges in creating Ajax applications are not technical. The core Ajax technologies are mature, stable, and well understood. As there are so many developers out there who already know how to use these technologies, we expect to see many more organizations following Google’s lead in reaping the competitive advantage Ajax provides.
The challenges are for the designers of these applications to forget what we think we know about the limitations of the Web, and begin to imagine a wider, richer range of possibilities
Q19. Do Ajax Applications Always Deliver A Better Experience Than Traditional Web Applications?
Ans: Not necessarily. Ajax gives interaction designers more flexibility. However, the more power we have, the more caution we must use in exercising it. We must be careful to use Ajax to enhance the user experience of our applications, not degrade it.
Q20. Are Ajax Applications Easier To Develop Than Traditional Web Applications?
Ans: This is working code, it might help you.
xmldoc = req.responseXML;
Q22.What are all the different data types that JSON supports?
Ans: JSON supports following data types:
Q24.What Is The Difference Between Proxied And Proxyless Calls?
Q25. Did Adaptive Path Invent Ajax? Did Google? Did Adaptive Path Help Build Google's Ajax Applications?
Ans: Neither Adaptive Path nor Google invented Ajax. Google’s recent products are simply the highest-profile examples of Ajax applications. Adaptive Path was not involved in the development of Google’s Ajax applications, but we have been doing Ajax work for some of our other clients.
Q26. Won't My Server-side Framework Provide Me With Ajax?
Ans: You may be benefiting from AJAX already. Many existing Java based frameworks already have some level of AJAX interactions and new frameworks and component libraries are being developed to provide better AJAX support. I won't list all the Java frameworks that use AJAX here, out of fear of missing someone, but you can find a good list at www.ajaxpatterns.org/Java_Ajax_Frameworks.