Solved

Has my user done a runner?

Posted on 1999-01-14
13
175 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
 
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Finding a free PC on campus 6 54
Problem to ToolkitScriptManager 2 32
Compare site how does it work 4 52
SQL Injected data? 8 86
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

743 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

13 Experts available now in Live!

Get 1:1 Help Now