Jump to content

Find if Window/Page is Closed


Baez

Recommended Posts

In theory, you would need repeated polls from the page in question (Javascript) to a script on the server which would record in a database/file when the page is open (PHP), and a third script (PHP) run very frequently (by the cron daemon) to check the database to notice when a page has stopped polling, and then take the appropriate action.

 

I think this is how the Google Analytics ajax figures out how long a user stays on each page.

Hmm that does make sense thanks a lot :). I only need this to run on one page. And I'm assuming the best DB engine to use for this table would be MEMORY instead of MyISAM.

 

I'm just not sure if my VPS would be able to handle it!

 

Any tutorials or guides you know of to help me design this?

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.