This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes how to close the browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how to close the browser" Watch "how to close the browser" New topic

how to close the browser

Michael Waserman

Joined: Jul 10, 2004
Posts: 28
Upon finishing the session I would like to automatically close the browser for security purposes. How can I do it?

Thanks. Michael.
Ray Stojonic
Ranch Hand

Joined: Aug 08, 2003
Posts: 326
I presume you're talking about a web browser, like Firefox?

Because of the problems that would arise from being able to do this, it can't be done. You can 'suggest' the browser be closed via javascript, but the user will still get a pop-up asking if they want to close the window.
Daksh Sharma

Joined: Oct 27, 2004
Posts: 6
It cud be done using window.close() but then pop window will ask u whether u want to close the window or not

Offcourse this is javascript

I agree. Here's the link:
subject: how to close the browser
It's not a secret anymore!