You are here: Re: Ajax asynchronous is it possible ? « PHP Programming Language « IT news, forums, messages
Re: Ajax asynchronous is it possible ?

Posted by Jerry Stuckle on 08/23/07 15:08

Erwin Moller wrote:
> 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

Erwin,

He said he wants to notify the browser, and he wants to do it without
refreshing every few seconds. I take that to also mean polling.

Even 1K players polling every 5 seconds would place a heck of a load on
the server.

HTTP just isn't set up for this sort of thing.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация