Find onUnload Destination URL

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • TDonohue

    Find onUnload Destination URL

    I am trying to kill a cookie using onUnload if a user leaves the site
    or closes the browser window so someone else can't get a person's
    session.

    Does anyone know if there's a way to check where the window is going
    before it gets there?

    Many thanks in advance.

    -Ted
  • kaeli

    #2
    Re: Find onUnload Destination URL

    In article <586b865f.04011 51042.28387939@ posting.google. com>,
    donohule@gwu.ed u enlightened us with...[color=blue]
    > I am trying to kill a cookie using onUnload if a user leaves the site
    > or closes the browser window so someone else can't get a person's
    > session.
    >
    > Does anyone know if there's a way to check where the window is going
    > before it gets there?
    >[/color]

    No.

    Using a session cookie solves the latter problem.
    I have yet to see a good solution to the former. Which is why even
    banking sites tell you to use their log out button to log out for
    security, I'd imagine. If they can't figure out a good solution, I'd
    wager there isn't one.

    (Note: a GOOD solution. Not one that only works in some browsers for
    some people on the third tuesday of every month.)


    --
    --
    ~kaeli~
    If a turtle doesn't have a shell, is he homeless or naked?



    Comment

    • Lasse Reichstein Nielsen

      #3
      Re: Find onUnload Destination URL

      donohule@gwu.ed u (TDonohue) writes:
      [color=blue]
      > I am trying to kill a cookie using onUnload if a user leaves the site
      > or closes the browser window so someone else can't get a person's
      > session.[/color]

      Impossible, if you want to be absolutely certain.
      The onunload handler, if any, is called when you leave the page, no
      matter how you leave it (except killing the browser so fast it doesn't
      get to do anything or turning off the computer). You don't get to know
      why it is called.
      [color=blue]
      > Does anyone know if there's a way to check where the window is going
      > before it gets there?[/color]

      None. If he follows a link on the page, you can check it, but just
      entering something in the address bar is (luckily) not detectable.

      /L
      --
      Lasse Reichstein Nielsen - lrn@hotpop.com
      DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
      'Faith without judgement merely degrades the spirit divine.'

      Comment

      • Michael Winter

        #4
        Re: Find onUnload Destination URL

        On Thu, 15 Jan 2004 23:33:42 +0100, Lasse Reichstein Nielsen
        <lrn@hotpop.com > wrote:
        [color=blue]
        > The onunload handler, if any, is called when you leave the page, no
        > matter how you leave it [...][/color]

        Opera doesn't appear to execute onUnload event handlers when you close the
        browser or the page's tab. In fact, I've only found it do so when you
        navigate to another page.

        Mike

        --
        Michael Winter
        M.Winter@blueyo nder.co.invalid (replace ".invalid" with ".uk" to reply)

        Comment

        • Lasse Reichstein Nielsen

          #5
          Re: Find onUnload Destination URL

          Michael Winter <M.Winter@bluey onder.co.invali d> writes:
          [color=blue]
          > Opera doesn't appear to execute onUnload event handlers when you close
          > the browser or the page's tab. In fact, I've only found it do so when
          > you navigate to another page.[/color]

          Great :) Just the way I want it.

          So, on top of not being certain of being called, it is not even
          consistent in when it is called across browsers. Another vote for
          forgetting onunload! :)

          /L
          --
          Lasse Reichstein Nielsen - lrn@hotpop.com
          DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
          'Faith without judgement merely degrades the spirit divine.'

          Comment

          Working...