?
Solved

Browser close

Posted on 2014-03-14
3
Medium Priority
?
298 Views
Last Modified: 2014-03-18
Hi Experts,

I am facing interesting phenomena when I have login page [.net aspx] and user logs into system.
Then user closes the whole browser window [not just one or two tabs]
Then user opens browser again and you can see you page again as you are logged in and never left it.

I am not using caching although I do use authenticated cookie.

My question is how to avoid if window been closed and opened to treat user as logged in ?

I have some code on unload and before unload as well clearing all cookies ans session data.

How its possible ?

Thanks.
0
Comment
Question by:fpoyavo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 63

Expert Comment

by:Fernando Soto
ID: 39930323
Hi fpoyavo;

Please have a look at the article below.

CodeSnip: Handle Browser Close Event on the Server-Side
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 1500 total points
ID: 39930329
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39930361
If the user has set their browser to open the last page (or pages) from the previous browser session, that is probably coming from the browser cache and not your server.  Session cookies should expire when the browser and ALL of it's windows are closed.  If even one window is left open, the session cookies do not expire.  

'on unload' and 'before unload' can not be counted on.  If the power goes out, you are likely to see the same phenomena.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question