Monday, January 29, 2007

typical Ajax lifecycle within the browser:

Visit: The user visits a site the usual way, i.e. by clicking on a link or typing a URL.
Initialisation The page initially loads. Callbacks are established to handle user input, a loop might be established to continously refresh page elements.
Event Loop:
Browser Event An event occurs, such as a keypress.
Server Request The browser sends a request to the server.
...Server processes the event>
Server Response A moment later, the server responds, and the response is passed into a request callback function, one that was specified when the request was issued.
Browser Update The request callback function updates the DOM, including any Javascript variables, according to the response.


SOURCE : www.referjava.com

No comments: