Ajax Interview Questions
What are the steps of creating an AJAX request?Posted By: TRAVELSErAjax
What is Ajax? LIst few benefits using AJAX?Posted By: JavierlalAjax
What is difference between Asynchronous and Synchronous code?Posted By: R S RUSSELLAjax
RIA Stands For what?Posted By: VesterAjax
For what XMLHttpRequest object is used?Posted By: GarfieldAjax
How to create an request object?Posted By: MerrittAjax
What are various Httpo status codes returned by AJAX?Posted By: CharlesAjax
How to cancel the current request in AJAX?Posted By: MaxAjax
What does AJAX stand for?Posted By: LoraAjax
When should you use the POST HTTP method with AJAX?Posted By: shankarAjax
What is difference between JSON and JSONP?Posted By: WenzelAjax
Which jQuery method is used for handling errors in an AJAX response?Posted By: JimAjax
Which is better?
|AJAX used to send and receive data between a web browser’s objects and another source usually a web server commonly over HTTP.||JSON is a simple data format that could be read by any human being. It can send via AJAX but can be used for other purposes besides AJAX.|
|AJAX message entirely dynamic means it doesn’t have any specific structure.||JSON message always defines one well-defined Object structure|
|AJAX is mainly used for designing the web page, especially when the page needs some server-side data without refreshing the same.||JSON is mainly using for Restful Web Service, which is not used for specific web applications.|
|It is always used for web applications||JSON is sometimes not used for a web application at all.|
Advantages of Ajax
- Improved User Experience: One of the main advantages of AJAX is enhanced user experience. It is easy to update the webpages by just interchanging a little amount of data with the server. With the help of this, you can easily update the parts of the webpages without reloading the page. It is very helpful in comparison with the other classic webpages where reloading is a must.
- Better Infrastructure:We are living in the modern world where most of the homes have broadband and server capacities. AJAX application can be hungry for both server capacity and bandwidth due to the frequent back-and-forth between client and server.
- Increasing Productivity: There are many functions in the AJAX library that can increase overall productivity without getting frustrated. The well configured ASP.NET application has its own data access along with the business layer. Moreover, it also comprises of the UI layer where the server-side operations are performed.
- Form validation:AJAX provides the validation of forms which is the biggest advantage. As, we know, forms are the important elements in the web pages, so instant validation improves the speed as well as security.
- Speed: AJAX reduces the traffic that travels between the client and the server-side request and the response. This lead to fasten the response time, which increases the performance and speed.
Disadvantages of AJAX:
- Performance Concerns: Regular interaction between the browser and the server makes the application less responsive. Although there are some solutions to it like browser-side caching. These tricks work, even for active applications like stock trading but it might not work for time-critical applications like machine control.
- Not Search Engine Friendly: Another major key problem of the AJAX is that it is not good for the search engines because the dynamically rendered content is not noticeable to the search engine. Therefore, AJAX-driven pages are not likely to rank great in the search rankings.