|
-
Jan 27th, 2004, 02:50 PM
#1
Thread Starter
Hyperactive Member
How to make the value updated always?
Last edited by raladin; Mar 29th, 2014 at 10:32 PM.
-
Jan 27th, 2004, 05:35 PM
#2
<?="Moderator"?>
do you mean something like this
Code:
<META HTTP-EQUIV="Refresh" CONTENT="5; URL=pagename.php">
how are u using the php file? thought a webbrowser control or as a script run from the command line?
-
Jan 27th, 2004, 06:17 PM
#3
HTTP is a stateless protocol. The only times when there is communication between the client and the server is when the client is requesting something. After that, they disconnect (for all you know, they might keep the connection alive for performance reasons), and the server never knows if the users has left the site or is still looking at it.
A reload meta would do it, except that it disrupts the user's action every 5 seconds. The same in an iframe wouldn't disrupt the user though. But there's no way you can get informed if the user leaves, you can only time him out, and that doesn't take effect until he comes back.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 27th, 2004, 11:31 PM
#4
Thread Starter
Hyperactive Member
Last edited by raladin; Mar 29th, 2014 at 10:32 PM.
-
Jan 28th, 2004, 05:22 AM
#5
Have a timer in the VB to send the request every 5 seconds. Then, on the server, if no request has come for ~15 seconds (= what you should allow for bad connections) you "know" that the user has gone away. Only that no script gets executed, but the last timestamp at least still records the last time the user contacted the page. When you get the next request, you can check on this and send the user back to the login.
Of course, this is bad. If I was on a dialup I'd disconnect as soon as I had the page, and I wouldn't want the app try to connect to the net every 5 seconds.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|