push data from server to client

  • Thread starter Thread starter Jaco Bregman
  • Start date Start date
J

Jaco Bregman

Hi all,

I'm looking for a way to inform clients of a server side event on my
website. What I want to do is to update a user's webpage when a process logs
in on the server. Untill now I use a refresh statement in the client's html
code, and I read from the database in the Page_Load( ). On every postback
database contents are read and used to keep the site up to date. What I want
to do is to let the server push the updates to the clients, instead of using
a refresh statement on the client side.

Any ideas on how to accomplish this?

Regards,

Jaco
 
Jaco,

Due to the HTTP protocol this is not possible.
You can only poll the server and see whether any change occurred.

Even if you succeed in pushing a message to the client (see below) you get
into trouble with firewalls etc and local IP addresses.

The best thing you could do is write a Java applet that polls for a small
message every x seconds (without needing to refresh the entire page). When
the Java applet sees the "refresh" flag is set at the server, it might
communicate with JavaScript on your page ("Live Connect" this is called, if
I'm not mistaking) to have your page refreshed entirely.

Wim
 
Back
Top