In the scenario, when the session expires in our system or application, it automatically redirects to the log-in page.
If I have the application open in two different browsers and the session times out in one browser window, ideally it should also close the other window. However, currently I am still able to interact with the second browser/window, such as clicking buttons, etc.
I am seeking suggestions on how to handle this situation.
<pre>
<code>
Below is my JavaScript code snippet:
<script type="text/javascript">
<!--
function closeWindow() {
self.close();
}
// -->
</script>
Server side code example:
If Not clsUserSession.IsSessionExist(getUserid, False) Then
Me.ClientScript.RegisterStartupScript(Me.GetType(), "CloseWindowScript", "closeWindow();", True)
Exit Sub
End If
JavaScript code again:
<script type="text/javascript">
<!--
function closeWindow() {
self.close();
}
// -->
</script>