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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Detect when user browser goes to another web site

    Hello folks,
    Is there any way that an Apache server can recognise that a users browser has changed from your web site to another site. ie. is there a way of executing a CGI based on when the address bar no longer has your FDQN.
    Would this be via Javascript [if possible?] or ???

    Sorry for this naive question):

    Thanks

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,641
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Depending on how the visitor has their browser and firewall configured the site they have reached might be able to identify that they came from your site or it might not. The code to test for it would have to be on the site that they go to though because once they leave your site you have no way to run anything.
    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.

  • #3
    Regular Coder
    Join Date
    Oct 2006
    Posts
    206
    Thanks
    1
    Thanked 0 Times in 0 Posts
    You could have an onunload event listener to do something when window.location.href changes. You would have to disable that event listener when a link to somewhere else on your site is clicked. It's not a perfect solution (it will not handle manual changes of window.location.href) but it may be sufficient for your situation.
    Last edited by 1212jtraceur; 01-14-2007 at 10:43 PM.

  • #4
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for your replies. I'll have to give it up unfortunately.


  •  

    Posting Permissions

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