Recently I put a question regarding HttpSession invalidation when user jumps to otherURL. I got a answer but still I am facing some problems.
What I did was, I have two frames in one page. In one of the frame I have coded java script like this.
var leaving = false;
<body onUnload='if (!leaving) document.forms["search"].submit()'>
<form name=search action="/servlet/Logout" method="GET">
<input type="hidden" name="Invalidate" value="true">
I have servlet(Logout) which Invalidate the HttpSession.
The problem is, When I jump to other URL like msn.com or hotmail.com from my application/website the onUnload event is invoking the servlet and It displaying a empty page as responce from the server. In my browser location also It displaying my servlet path.
But I don't want this. onUnload has to invoke the servlet and at the same time the msn.com or hotmail.com page has to be displayed. I should not get any responce from my servlet.
Is there any way to do this?
Thanks in advance.