blog

Home / DeveloperSection / Blogs / Advantage and disadvantage of Ajax

Advantage and disadvantage of Ajax

Anonymous User6858 02-Mar-2015

Hi everyone in this blog I’m explaining about advantage and disadvantage of Ajax.

Description:

AJAX, short for Asynchronous JavaScript and XML, allows you to load data in the background and display it on your webpage, without refreshing the page. This allows you to create websites with much richer functionality. Popular web applications like Gmail, Outlook Web Access, and Google Maps uses AJAX extensively, to provide you with a more responsive, desktop-like experience. 

Using AJAX can be a bit cumbersome, because the various browsers have different implementations to support AJAX. Normally this would force you to write code to respond differently, depending on the browser, but fortunately, jQuery has done this for us, which allows us to write AJAX functionality with as little as a single line of code. 

You should be aware of the fact that there are both advantages and disadvantages to using AJAX on your page though, which means that you should always consider carefully before deciding to use it instead of doing a regular postback to the server. Here's a summary:

Advantages:

  1. Your page will be more pleasant to use, when you can update parts of it without a refresh, which causes the browser to flicker and the statusbar to run.
  2. Because you only load the data you need to update the page, instead of refreshing the entire page, you save bandwidth.
Disadvantages:

  1. Because the updates are done by JavaScript on the client, the state will not register in the browsers history, making it impossible to use the Back and Forward buttons to navigate between various states of the page.
  2. For the same reason, a specific state can't be bookmarked by the user.
  3. Data loaded through AJAX won't be indexed by any of the major search engines.
  4. People using browsers without JavaScript support, or with JavaScript disabled, will not be able to use the functionality that you provide through AJAX.

The first two items on the list may be circumvented though, typically through the use of an iframe and reading and writing data from the part of the URL after the # character. 


in my next post i'll explain about File Upload Using Ajax


Updated 16-Feb-2018
I am a content writter !

Leave Comment

Comments

Liked By