This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes What are the benefits of AJAX ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "What are the benefits of AJAX ?" Watch "What are the benefits of AJAX ?" New topic

What are the benefits of AJAX ?

Jithesh Kozhipurath
Ranch Hand

Joined: Aug 27, 2003
Posts: 76
I would like to know what are the possible advantages we get by using AJAX. Certainly there is a performance benefit. But other than that there are many disadvantages like, security a major threat, then the issue of using back button or using a forward after giving a XML request. Is there any ways in which we can avoid such problems? Then, a JavaScript is always exposed to the clients, so is there any possibility to hide the xml access code from the client. Please clarify if there is any possible solution to overcome these issues.

Thanks in advance,


Jithesh K
Eduardo Luttner

Joined: Jul 21, 2004
Posts: 3
The browser sends the requests using the same header as it would do for a normal request.

If the page that will be returned by the ajax request must pass by a session verification, it will send the session id through the kookies header.

This will prevent access to unauthorized pages.

The ajax response is like any server side response, and should be configured to be NOT cached and can also be a HTTPS page if needed.

Regarding the back/forward button, the request is added by javascript to the current page, so all the content returned by the ajax request exists only in the current page, as javascript variables.

I hope this can clarify you about the ajax.
I agree. Here's the link:
subject: What are the benefits of AJAX ?
jQuery in Action, 3rd edition