Solved

Browser close

Posted on 2014-03-14
3
289 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
3 Comments
 
LVL 62

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 500 total points
ID: 39930329
0
 
LVL 82

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)

762 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now