Page reload initiated from server

M

Max

Is it possible to reload a web page on user browser when an event occurs at
server side?
For example when user A places an order, user B should be notified of that
and should see that order on his page.
I 'd like to avoid to reload B page every nnn seconds. Or at least, I'd like
to check if something interesting has changed on server and only in that
case to reload the page.

Any suggestion?
Thanks Max
 
P

Patrice

No as we are using a client request/server response model. You could
simulate this by having the client to ask to the server if the page should
be refreshed (à la AJAX for example). It would allow to do an actual refresh
only when really needed instead of refreshing regardless of the usefullness.
Also take extra care so that the refresh doesn't prevent the user achieving
what he wants to do.

You could also just wait for the next round round trip and have whatever the
current page is, an alert message displayed at the top, that could display a
link to access those new orders or use some kind of out of band messaging
system depending on the reason you want to keep track of this in "real
time"...
 
J

John Saunders

Max said:
Is it possible to reload a web page on user browser when an event occurs
at server side?
For example when user A places an order, user B should be notified of that
and should see that order on his page.
I 'd like to avoid to reload B page every nnn seconds. Or at least, I'd
like to check if something interesting has changed on server and only in
that case to reload the page.

User "B" doesn't have a page. Once the page has been rendered (and even
before it displays on user B's browser), the Page object is destroyed. While
user B is waiting for his page to display, ASP.NET has nothing to do with
him.

The suggestion to use AJAX or something like it is a good one. At the very
least, you can use JavaScript to make a request in another window to a tiny
page that just returns whether or not there is a reason to reload the page.
When there is, the other window can tell its parent that it's time to reload
the page.

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,522
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top