I'm using perl in cgi, how can I detect when the client leaves the site, or the cgi page? I'd greatly apreciate it if someone could answer my question.
I hate to break this to you but the protocol does not give you any indication of a client continued connection.
Each page that the webserver supplies is sent off into the "ether" with no way of knowing if anything will ever come back again.
Many developers maintain some kind of session using cookies but this only tells you that the current page request is part of a previous session, it does not tell you when the client window closes or the client disconnects.
There maybe some very nonstandard ways of getting some kind of indication as you would like but I could not recommend using them.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.