By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,190 Members | 801 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,190 IT Pros & Developers. It's quick & easy.

Page reload initiated from server

P: n/a
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

Mar 14 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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"...
"Max" <ma*@nospam.nospama écrit dans le message de news:
BI***************@tornado.fastwebnet.it...
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



Mar 14 '07 #2

P: n/a
"Max" <ma*@nospam.nospamwrote in message
news:BI***************@tornado.fastwebnet.it...
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
Mar 14 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.