Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Aug 2010
    Location
    Now Southern Oregon. I was born and had lived my life in Los Angeles until relocating last year (2010)
    Posts
    211
    Thanks
    52
    Thanked 1 Time in 1 Post

    How to determine when a client has left a domain?

    Hello;
    I have been developing in html/css/javascript/Flash ActionScript on the
    client side and php/MySQL on the server side for a while now and have
    encountered the issue with when to know when client tracking can be
    closed; I.E.
    1: the client has navigated to another domain, and has no other
    windows opened with the current domain
    2: the client has used his/her 'Home' button (onunload event can't
    tell what is being done by the client)
    3: The client software is exited.
    4: network connection goes bad or down.

    It appears that a broad solution would be to modify protocols to require
    http and ftp clients to sent a notice to the server when there are no more
    windows or connections to a domain.

    It seems that that issue would have been addressed, considering all the session handling that goes on. So far an explicit logout mechanism has
    to be used by the client, which is elective. Otherwise there is a pile of
    session records with loose ends.

    Ultimately, is there accommodation already in these protocols for this; I
    don't know of any.

    Thanks for time and attention and comments, suggestions, etc
    JK

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,620
    Thanks
    0
    Thanked 645 Times in 635 Posts
    For those visitors who have JavaScript enabled you could use an ajax call to the server on a setInterval that lets the server know they are still on the page. When the interval passes and a new signal isn't received then you know they left during the prior interval.

    There is no way to tell if they don't allow that script to run.

    There will never be anything in any of the protocols to handle this as modifications are being made to introduce privacy and not to remove what little privacy the internet does already have built in.
    Last edited by felgall; 02-26-2012 at 03:38 AM.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •