we have an web-application built in flash (it’s actually just getting built :D) where is very important to be notified, when user closes his window.
Since it’s in flash, we do not worry about Javascript, we do not support non-javascript users.
What is the safest (meaning it’s 100% sure it gets called) X-browser way to call php script to close session, make some db changes, etc.?
Thank you
There is no method which is 100% sure to work. You can’t get a signal form the client if there is a network problem, power cut, etc.
Periodically run a clean up script (based on time, not activity) that performs all the deletions etc for sessions which have had no activity in X minutes.