Ajax JavaScript CSS HTML 5 Gecko XUL Forum

Should I use Ajax?

Question

Is it really necessary to use Ajax? Can not we just make use of simpler techniques like iframes? Or DHTML?

Short answer

Ajax becomes necessary when you want a dynamic site or pages, and that they be updated by loading data from the server, after the display, at the request of the user, or to renew the content.

Long answer

The asynchronous mode and XMLHttpRequest

Ajax, in addition to the components of Dynamic HTML, including JavaScript, CSS, DOM, has the asynchronous mode that is provided by the XMLHttpRequest object.

Ajax or iframes?

They help to integrate a content from other pages. But this content is not part of the current page, it can not directly be accessed from it and modified. Iframes are perfect to view additional content from the same site or another site.
An example of iframe is given by the CSS Tab Panel that allows to display pages or images selected by the user.
The contents are displayed in an bounded area while Ajax can change any element of the page itself.

More infos
© 2009-2011 Xul.fr