Re: OnBeforeUnload Event
- From: Randy Webb <HikksNotAtHome@xxxxxxx>
- Date: Thu, 27 Apr 2006 02:29:03 -0400
Ricky Chan said the following on 4/26/2006 10:44 PM:
Actually, the location.replace will redirect to the page logout.asp.
Then you are depending on a bug in a browser. If the browser is closing then how do you think it should access a new page? That would be *very* annoying to say the least. I left, leave me be. I bet it works real good when you navigate away. A user clicks a link or uses a Favorites or types in a URL to go elsewhere and you redirect them to your own page instead of where I went. Real user friendly.
Use sessions and timeouts of sessions - problem solved.
logout.asp will abandon the sesson and update the user logout time to the DB.
If you say so, I don't agree.
We want to record the user logout time when user click the X button on the right hand corner .
You can't. You are trying to solve a server issue with client side code and, as you see, you can't depend on it. Use sessions and timeouts on the sessions.
We have tried it, it works.
Obviously it doesn't "work" all the time.
but sometimes client tell us there is a error "access is denied" showed when click the X button.
Thats because you are using the wrong mechanism to solve your problem.
Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
.
- References:
- Re: OnBeforeUnload Event
- From: Randy Webb
- Re: OnBeforeUnload Event
- Prev by Date: Re: DHTML editor dettach event
- Next by Date: Preloading jpegs in IE problem
- Previous by thread: Re: OnBeforeUnload Event
- Next by thread: Preloading jpegs in IE problem
- Index(es):
Relevant Pages
|