Web Analytics Made Easy -
StatCounter refresh? - CodingForum

Announcement

Collapse
No announcement yet.

refresh?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • refresh?

    any javascript event that happen when the user refreshes but don't happpen when the user goes to another locaction?


    or anyway to figure out which is happening in onunload it launches both on refresh and when the user goes to another page or closes browser.

  • #2
    No way to detect if page is refreshed. Why do you want to do that? I guess you were thinking of this as a workaround to your original problem. If you would describe your original problem, maybe you would get a more appropriate solution.
    Glenn
    vBulletin Mods That Rock!

    Comment


    • #3
      my problem basicly is that I wanna kill a session when the user leaves my page, but if I do it onunload it is killed also if he just refreshes.

      Comment


      • #4
        Is this for an ASP application?
        There is an old thread that discussed about that ASP session problem.

        There is a trick to detect the user clicking the browser's X button which I presented in that thread but I admit that it's not a fool-proof solution. The bottom line is, you can't really do a graceful logout if the user just closes the browser because there is no request to the server that tells the user is logging out. Although the Session_OnEnd handler is still fired but only after the session timeout is reached.
        Glenn
        vBulletin Mods That Rock!

        Comment

        Working...
        X