Patrice pisze:
Quote:
No the server can't reach a web client. This is always the client that sends
a request to the server and the server only responds to incoming requests.
>
You could issue an AJAX call to the server that just tell if the client
should be updated. If not you have nothing more to do, if yes you can issue
your more complex ajax calls that would update parts of your pages...
>
Youn may want to explain a bit more what you are trying to do...
--
Patrice
>
"Piotr Nowak" <p.nowak2@STRIPTHISwasko.pla écrit dans le message de news:
fajeb8$ont$1@atlantis.news.tpi.pl...
Quote:
>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
>
>
Sure its quite generic problem.
Imagine you develop a online game, like ogame.
There's a lot action behind the scenes, players are making some actions
that take some time (training soldiers, building houses) which takes
some time (minutes, hours, even days). after time is up and soldier,
building is finished a browser should be refreshed to say - 'hey, your
request is done now !, you succesfully trained 5 soldiers and built one
house'.
So, it doesnt make sense to poll every 5 seconds if action of building a
house last 2 days ! Divide 2days by 5 seconds and you get number of
waisted requests to check if action is done.
was this enough clear for You ?
best regards