You can't with exact certainty know whether the client is closed. You can make some qualified guesses, but it will never be reliable.
Maybe you could find a comprise where you are satisfied with knowing if a client session is active or not?
A low-tech solution would be to save the session id (or a selfmade unique identifying string) along with a timestamp.
Whenever the client makes a new request (new page load and/or with AJAX), update the timestamp.
Since you don't have access to cronjobs, you need to make another compromise - let the other visitors tell you whether the client still is active.
Whenever a visitor loads a page, run through the table which stores the session id's and timestamps and see if any sessions looks older than what you would consider being active.
It's not a sulotion to your exact problem (since it cannot be done) but a low-tech compromise.