Hi, i wanted to ask if it is possible to send data to browser without browser request. For example, i have mail.google.com open in browser and when I receive new mail, popup shows. Is that ajax loop checking if new mail arrived or it is possible like I asked. Also, is it possible that browser makes request and server doesn't respond until there is new mail? Is there time limit using ajax? Thank You!
No, that's not possible Not possible either. With every request that is made, the server needs to handle the request in order to check if there is a new mail. However it is possible to send a blank response. What do you mean by time limit?
I dont understand all your ideas, but I think if you use SetTimeout to set time to re-check email by PHPMailer function. So why do not you try it? Wait for your result!
I mean if browser makes new XMLHttpRequest, is there any time limit in which server needs to response. I'm asking this in case there is any kind of response postponement from server. So, server would response when new mail arrived.
Yes you can set timer to send request for example every 1 minute to the server using jquery $.post, $.ajax methods will make it alot easier for you, instead of making loooong poor ajax requests and handle internet explorer problems yourself
Maybe he's asking about the server/browser timeout? Like if the server doesn't respond in 5 minutes, what happens?
No server side program will update the client side content without any request from the browser. It is just the ajax thread which consistently checks for updates.