473,383 Members | 1,725 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Logging Off

Hello, Can anoyone help me with the following:

I have a application online using ASP in which users log in and log out.
However, a lot of users simply close the window, bypassing my log-out
script. I have tried using the Javascript onUnload function with success,but
refreshing the screen also triggers this at the wrong time, Has anyone got
any suggestions?

Thanks in advance,

Gram
Jul 20 '05 #1
3 2719
Create a frame structure and put the unLoad listener on the window that
contains the frames (the top window). That way the frame containing your app
can change URLs willy nilly, but the unLoad event with your log off routine
won't happen until the top window is unloaded.

Mike

"Gram" <gr******@hotmail.com> wrote in message
news:vo**************@news.indigo.ie...
Hello, Can anoyone help me with the following:

I have a application online using ASP in which users log in and log out.
However, a lot of users simply close the window, bypassing my log-out
script. I have tried using the Javascript onUnload function with success,but refreshing the screen also triggers this at the wrong time, Has anyone got
any suggestions?

Thanks in advance,

Gram

Jul 20 '05 #2
Mike wrote on 10 Dec 2003 at Wed, 10 Dec 2003 16:56:26 GMT:
Create a frame structure and put the unLoad listener on the
window that contains the frames (the top window). That way the
frame containing your app can change URLs willy nilly, but the
unLoad event with your log off routine won't happen until the
top window is unloaded.


What if my browser crashes? What if I disconnect before logging off?
What if my browser doesn't execute onunload events[1]?

Important actions should be carried out as soon as the user does
something that makes those actions necessary. For example, if you are
recording preferences that are in-line, rather than on a separate
page, and the user changes an option, that preference should be
recorded immediately.

The logging off process should be able to occur in two ways: when the
user clicks a 'Log Out' link or button, or after a certain period of
inactivity. Both should do the same things, but only the former
should require user interaction or presence.

Mike

The only thing you can guarantee is that user's don't follow
instructions.
[1] When I was trying to record preferences with onunload (before I
took the advice above), I found that Opera didn't do anything, while
IE did. I tried putting window.open() calls, alert boxes, page
changes, and cookie creation statements into the event, one at a
time, but none of them worked. I assume then, that Opera doesn't
support onunload.

--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk")
Jul 20 '05 #3
"Gram" <gr******@hotmail.com> writes:
I have a application online using ASP in which users log in and log out.
However, a lot of users simply close the window, bypassing my log-out
script.
A very common problem, and there is no safe solution. Remember, the
user might not even be connected to the internet, when he closes the
browser. With that in mind, you might as well change your session
design to using a timeout.
I have tried using the Javascript onUnload function with success,but
refreshing the screen also triggers this at the wrong time, Has anyone got
any suggestions?


Instead of sending a logout command with the onunload handler, send a
"log me out in 20 seconds unless you hear from me again" command. If
the page is refreshed, you know you can ignore it. Otherwise you can
log him out after 20 seconds. Pick a time that is not too short, based
on the normal behavior of yuor users.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: jjesso | last post by:
I am trying to add a new logging level. logging.config.fileConfig("bengineLog.cfg") logging.CLIENT = logging.INFO + 1 logging.addLevelName( logging.CLIENT, 'CLIENT' ) logging.root.setLevel( )...
0
by: Karuppasamy | last post by:
H I am trying to use the Logging Module provided by Microsoft Application Blocks for .Net I installed everything as per the Instructions given in the 'Development Using the Logging Block' ...
6
by: pmatos | last post by:
Hi all, I am trying to create a simple but efficient C++ logging class. I know there are lots of them out there but I want something simple and efficient. The number one requirement is the...
23
by: Rotem | last post by:
Hi, while working on something in my current project I have made several improvements to the logging package in Python, two of them are worth mentioning: 1. addition of a logging record field...
6
by: Burkhard Schultheis | last post by:
As I wrote last week, we have a problem with a DB2 V8 on Linux. Here is what is in db2diag.log during online backup: Starting a full database backup. 2004-04-01-02.33.54.760164 ...
0
by: robert | last post by:
As more and more python packages are starting to use the bloomy (Java-ish) 'logging' module in a mood of responsibility and as I am not overly happy with the current "thickener" style of usage, I...
0
by: rajesh.hanchate | last post by:
Please help me in resolving this issue. I am using EnterpriseLibrary 2.0 Exception and logging block for logging exceptions to event log. It works fine for sometime. After some time it stops...
3
by: Chris Shenton | last post by:
I am setting up handlers to log DEBUG and above to a rotating file and ERROR and above to console. But if any of my code calls a logger (e.g., logging.error("foo")) before I setup my handlers, the...
3
by: Lowell Alleman | last post by:
Here is the situation: I wrote my own log handler class (derived from logging.Handler) and I want to be able to use it from a logging config file, that is, a config file loaded with the...
4
by: samwyse | last post by:
In the Python 2.5 Library Reference, section 14.5.3 (Logging to multiple destinations), an example is given of logging to both a file and the console. This is done by using logging.basicConfig()...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.