Jump to content

Time a vistor leaves the webpage


coder500

Recommended Posts

Not with much accuracy, unless you want to get into parsing log files. When a user leaves your site via closing the window, nothing is sent to the web server to indicate their leaving.

 

As for leaving the site to go to another, you can parse the logs to see the last page and time the IP address was there, but you'd be constantly parsing the logs.

It turns out that IE will let you request a URL in an onclose event (close does not mean close), but FF won't (close does mean close.) I tested this some time ago.

 

The best suggestion I have seen would be to use AJAX to periodically request a URL (once every 30/60 seconds...) that is used to update the last active time.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.