|
Posted by Erwin Moller on 08/23/07 13:55
Jerry Stuckle wrote:
> Piotr Nowak wrote:
>> Hi,
>>
>> Say i have a server process which listens for some changes in database.
>> When a change occurs i want to refresh my page in browser by notyfinig
>> it.
>>
>> I do not want to refresh my page i.e. every 5 seconds, i just want to
>> refresh it ONLY on server change just like desktop applications do.
>>
>> The problem is that refreshing evry n seconds has to much impact on my
>> web server. The refresh action should be taken only when something
>> really happens that makes sense
>>
>> Is it possible ?
>>
>> greets, peter
>
> Despite some other comments, no, it's not really possible with HTTP
> protocol. HTTP is a "request/response" protocol - the browser sends a
> request and the server responds. There really isn't a mechanism for
> sending unsolicited responses.
>
> As others have mentioned, it is possible to to with other means, i.e.
> Java or Flash. But not in PHP.
>
Well, it IS possible with javascript and polling.
It stinks, depends on javascript, creates serverload, etc, but it IS
possible.
But I agree it has nothing to do with PHP. :-)
Regards,
Erwin Moller
Navigation:
[Reply to this message]
|