Solved

Has my user done a runner?

Posted on 1999-01-14
13
180 Views
Last Modified: 2013-12-25
null
0
Comment
Question by:acsmith
  • 6
  • 3
  • 3
  • +1
13 Comments
 
LVL 1

Author Comment

by:acsmith
ID: 1857943
..and checking to see if the user's details are already loaded into the dll when they log on is not really an option, because we'll be running several servers (therefore several dll's obviously!)
0
 
LVL 3

Expert Comment

by:idt
ID: 1857944
<HTML>
<HEAD>
</HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function leave() {
//you could do some kind of post back to server here
alert("DON'T LEAVE ME!");
}
// End -->
</SCRIPT>
<BODY onUnload="leave()">
</BODY>
<HTML>

Let me know if this helps
-iDT
0
 
LVL 1

Author Comment

by:acsmith
ID: 1857945
thanks for that, but I've been told that the onunload event doesn't always get triggered if they forcefully kill the browser. If nobody else can offer any suggestions,  i'll ask you to repost an answer so you can get the points. Thanks.
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 10

Expert Comment

by:MasseyM
ID: 1857946
In ASP There is a function that is called "isclientconnected".  It will check state to see if the client is connected.  I am not 1005 sure how you would implement this, but you could use code like this:

<%
If Not response.isclientconnected then
  ShutdownID = Session.SessionID
  shutdown(ShutdownID)
End If
%>


0
 
LVL 3

Expert Comment

by:idt
ID: 1857947
sigh,
you are right, onUnload probably will not fire on netscape if shut down, on IE it does, forgive my premature ejaculation
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1857948
man, I totally passed over the last part of the question...

But, why not just use an include statement in each page on the site that includes that code.  So it checks everytime they go to a different page.
0
 
LVL 1

Author Comment

by:acsmith
ID: 1857949
MasseyM, yeah I knew about the isclientconnected, but it seems a bit pointless. You can only use it when an asp is processing. For the asp to be processing, the user must have requested the page, and therefore must be connected. I guess you could use it if you have an asp which takes forever to run to test whether it's worth continuing the processing, but what if a client has requested a page, received it, and then shuts down the browser. No asp would be running, so you can't use response.isclientconnected. Any other ideas? the more I think about this, the more convinced I am that there is no solution :(
0
 
LVL 1

Author Comment

by:acsmith
ID: 1857950
sorry, must have been still typing while your last comment was posted. Can you expand a bit more on the include statement idea?
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1857951
Well, I was just thinking about two things.

1) You could have a hidden frame field that refreshes every x seconds that will check the isclientconnected variable.  ?  Sounds like a good idea, but I am not sure how feasible it would be.

2) In every HTML page, just check the isclientconnected variable.  This was, they would not have to be on an ASP page.

0
 
LVL 1

Author Comment

by:acsmith
ID: 1857952
1 sounds reasonable, but i'm not sure how much extra load that would put on the server. I'll try it and see. I can't see how 2 could work though, the isclientconnected thingy can only be checked from within an asp (AFAIK). Actually, thinking about point 1, that wouldn't work either. If the client has killed the browser, the hidden frame won't get refreshed, so I still can't check if they're connected. I really don't think this is possible :((
Thanks for your ideas anyway.If nobody else can help, repost as an answer to get the points.
0
 
LVL 3

Expert Comment

by:idt
ID: 1857953
would the overhead of constant posts by clients more than offset the savings of caching the data in the dll in the first place?

I think a better solution might be to have the dll regularly flush its data back to the server,  something likeif data has changed, and no activity for n minutes (less than the session time out), the flush back to server.

Just an alternative.

-iDT

"time waits for no man, but it has been reported to wait for turtles"
0
 
LVL 1

Author Comment

by:acsmith
ID: 1857954
yep, regular post back to the server cause big queues, and the request wait time goes sky high.The dll currently only writes back when something has changed, and it looks like i'm going to have to be happy with that. I'll split the points (check the authoring topic). thanks for the input.
0
 

Accepted Solution

by:
gate14 earned 200 total points
ID: 1857955
doh!
0

Featured Post

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
push Book Today button to right 10 34
show form submit button based on jquery sum 5 44
Create animated movies for web page 18 83
Why "Mobile First"? 5 17
Read about why website design really matters in today's demanding market.
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
This video teaches users how to migrate an existing Wordpress website to a new domain.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

809 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