Home     |      Learn AJAX     |      Forum     |      Register     |      Submit Resource     |      Submit Article      |      Contact Us

Home AJAX-Tips
 

Misusing XMLHttpRequest in a Website

 

One of the best features of Ajax is the function XMLHTTPRequest. This function practically suggests the user’s ability to asynchronously receive information from the server. Although it is still possible for web developers to build an Ajax based application without using XMLHTTPRequest, this function single-handedly answers all the concerns of any web developers to build an Ajax based application.


However, there are times when XMLHTTPRequest is misused. Although adding this function is technically a good thing, there are situations wherein the web developer builds an Ajax based application and improperly using XMLHTTPRequest.


The following are the following scenarios wherein the XMLHTTPReuqest is misused:


Loading the entire webpage – The number one reasons why web developers add XMLHTTPRequest is that this function has the ability to separate parts of the webpage, individually loading without affecting each other. When you use XMLHTTPRequest for the whole webpage, you are blocking the basic things in a browser application. The history, the back button and the bookmark will never work when they are rendered as a whole by XMLHTTPRequest.


Building XMLHTTPRequest for hand held devices – iPhone and related products are coming out strong in handling Ajax based applications. However, remember that Ajax loading times is not based on the bandwidth but the actual power of the device. Right now, mobile devices are not really that powerful to handle an Ajax based application.


Over-using XMLHTTPRequest – This function is a great addition to an Ajax based application but that doesn’t mean that it has to be used all the time. Remember that an Ajax based application still needs to keep its ability to be explored by search engines. Some parts could be rendered as plain HTML and the words under that coding will be the only thing that could connect your site to the search engines. Also remember that the Ajax based application still needs to be usable and overdoing XMLHTTPRequest will never ensure your web application will work as planned.


Focusing on what users really need – Ajax could definitely upgrade the beauty of an Ajax based application. However, things can just get really ugly for an application when the web developer focuses on the beauty of the application instead of getting things done faster and better. There are so many Ajax based applications right now that we can use for free but they are there just to show the prowess of their Ajax coding instead of building a good application.


Using XMLHTTPRequest to automate acceptance

– XMLHTTPRequest could be used to upload and change information automatically in the web based application and there are Ajax based applications that exactly does that practice. However this poses a great risk for the users. We are still humans and we are prone to mistakes. With auto-loading function, users will not have the chance to confirm or think about what they are about to do. XMLHTTPRequest should not be used to automate but instead it should be used to confirm the webpage without reloading the entire webpage. In that way users will enjoy confirmation pages and remove the need to reload the webpage.



Read Next: Periodic Refresh in an Ajax Based Application



 

 

Comments



Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    

Sponsored Links