View Single Post
Old June 8th, 2007, 4:07 PM   #1 (permalink)
H
after g, before i
Resident.
 
H's Avatar
 
Joined in Jul 2004
Lives in N,BC,CA
8,087 posts
Gave thanks: 48
Thanked 131 times
AJAX on page close/leave

Has anyone ever done anything that involved executing code when someone either closes or leaves a page? Meaning some closes a tab, clicks a link, etc...

Just curious as to how you handled it. I'm looking at using window.onunload and sending a SJAX (intentional spelling) request when someone leaves to track some analytics stuff. Only problem is I'm finding browser support various greatly to the point it's pretty much unreliable. Any suggestions?
H is offline   Reply With Quote