views:

67

answers:

3

I have read up on AJAX and pushing technologies. Is AJAX still a pulling technology that still requires Push Technology such as Java Pushlets and Tomcat Comet?

In another words is it correct to say, that Data is being push from server to client. then client pulls that data using AJAX to place it on web browser?

A: 

In AJAX, it's always the browsers that initiates the action/contact with the server, yes. To the best of my knowledge, there is no way to push data after the page has completed loading.

Norbert de Langen
+1  A: 

yes ajax query data form the webserver like tomcat or other but there is difference in polling data form server between ajax reuqest and normal reuqest

here is the image which may clear information to you alt text

so as you can see in above image it only poll the require data between request not querying whole page form the server.

Pranay Rana
how can you see from the diagram above that it is only polling the required data between request and not querying whole page from the server?
JCX
you have to see the xmlHttpobject example for this which explain you more detail how it works
Pranay Rana
A: 

Technically speaking, you can use AJAX long polling or XHR streaming to achieve push-based messaging. These techniques both keep a connection to the server alive and allow for event-based messaging.

It is also worth noting that with appropriate server software, you can support WebSockets (a feature of HTML5), which are supported by the next version of the major browsers. <eventsource> is also out there, though it is only supported by Opera (booooo). Both of these technologies allow for seamless push messaging.

mattbasta