Web Analytics Made Easy -
StatCounter using the onunload or the onbeforeunload events - CodingForum

Announcement

Collapse
No announcement yet.

using the onunload or the onbeforeunload events

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

  • using the onunload or the onbeforeunload events

    Hello,

    Is there anyway in js when using the onunload or the onbeforeunload events to avoid executing the event handle function when the user reloads or refreshes the window?

    Or any way to handle window close event (close not unload)?

    I tried all ways of unload and beforeunload events and also a condition if (window.close)

    I also added a condition to onbeforeunload event to check if (this.window.closed) and nothing. Still the function handles the same when refreshing the page and closing it.


    You know of a way doing it?

    thank's
Working...
X