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

    Question How to detect browser Refresh or Close?

    In my application I want user to take an "Exit Survey"(Independent website) when he is leaving the application. As name explains, It should happen only when user closes current browser tab or browser window. Its possible using JavaScript OnUnload event. But the problem is that this event occurs on

    1. close of browser tab
    2. close of browser window
    3. click of any internal page link(i.e anchors and form buttons)
    4. click of browser's Refresh button
    5. click of browser's Back/Forward button

    I have handled first 3 cases but not able to detect Refresh and Back/Forward button click.
    Has anybody of you implemented such functionality??

    Thanks in advance!!!

  • #2
    New to the CF scene
    Join Date
    Jul 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Trust me on this one. It is simply not possible. I have recently tried to do pretty much the exact same thing, and researched this topic.

    It cannot be done. Period. I ended up with your 3 first points too.

    There is no way to detect if a user press the refresh or back navigation button.

  • #3
    New to the CF scene
    Join Date
    Jul 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts


  •  

    Tags for this Thread

    Posting Permissions

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