This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Web Page close on TimeOut Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Web Page close on TimeOut" Watch "Web Page close on TimeOut" New topic

Web Page close on TimeOut

Harish Tam
Ranch Hand

Joined: Feb 17, 2005
Posts: 71

Hello All,

I am looking for some guidance on closing the browser window on session expire,
currently the code works for Single window only if session expires and i click on any link which will redirect to some page within the same browser then the browser window gets closed on session expire but my problem is say if i have a link which opens a pop-up window then the code get executed on the pop-up window and the pop-up gets closed but the parent window stays as it is. is there a way i can close also the parent window on click of the link.


SCJP 1.4, SCWCD 1.4
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
Note: If the window is not created with you can not close it.

I think you are after: window.opener.close();

I agree. Here's the link:
subject: Web Page close on TimeOut
jQuery in Action, 3rd edition