Helpful Information
 
 
Category: System Administration
Closing a Users Browser

How can I close a users browser when required - with out needing confirmation from the User ?

Is this possible ?

I need to close users down after a time out period.

Thanks

Nick

I glanced over an article in the MSDN newspaper with a similar question. One of the solutions was to redirect the browser to a "logoff" page after a set time of inactivity (refresh to a new location). I will dig out the article and post the exact solution but this may give you something to go on.

Andy J

thanks - let me know

At last I have dug the solution from MSDN:

<META HTTP-EQUIV="REFRESH" CONTENT="1200;URL=http://MyServer/Logoff.php">

This tag redirects the browser to Logoff.php after 20 minutes (1200 seconds) if it is not refreshed or if another page is not loaded. Keep in mind that the page is redirected automatically if it has not been refreshed. If the user has taken actions on the page that did not result in the page being refreshed, the redirection still occurs.

Andy J

>>At last I have dug the solution from MSDN:

That does just redirection and doesn't close the user's browser at all.

<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by freebsd:
>>At last I have dug the solution from MSDN:

That does just redirection and doesn't close the user's browser at all.[/quote]

Sorry, I forgot to say that the redirection to Logoff.php would execute a php script that would sever links, sessions, databse connections or what ever needs closing. This solution does answer Nick's question:

<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by nickd:
>>I need to close users down after a time out period.

Thanks

Nick[/quote]



Closing the users browser isn't something most users would be very happy about. So I think a reasonable compromise would be a redirection to a logoff script.

Andy J.


[This message has been edited by eaamj01 (edited November 03, 2000).]

I think we'll just let the session time out on the Server and so force a re-login on the client .... much eaiser .....

but Thanks for your help

Nick

hmm can't you use the javascript code
self.close() ??

it'll promt you if you have a "normal" browser window if you really wanna close the window, but if you have poped a new window, with the
window.open("site.htm","title","width=500,height=300");
and on the page "site.htm" uses the self.close() it'll just close the window.

is this about what you're looking for??

regards
Simon

thanks, but I need to close the users main browser with OUT asking or a prompt.

pop-up are no problem.

Nick










privacy (GDPR)