![]() |
| ||
| deleting sessions on closing browser tab hi all i have my lougout.php which destroys sessions and session ids on logout. I want to have same effect means i want to call this logout.php script when the user closes the "browser tab". as these are the days of "browser tabs" so this is very important for me. when the user closed the whole browser then all session and session ids are destroyed automatically but these sessions are not destroying when the user closes the "browser tab". Its not possible with javascript but its possible with AJAX. I have not used ajax uptil now and have no knowledge. So it would be great if somebody helps me with calling my logout.php script on closing "browser tab". this is my logout script <? require_once("config.php");vineet |
| ||
| Re: deleting sessions on closing browser tab There is no reliable/standard way of detecting a browser close event. Though there are non-supported workarounds, a browser close event is not something you should rely on. Anyways, here is a snippet which seems to be working fine on IE. If you are new to Ajax, I recommend using the AjaxToolbox library to do away with writing most of the boilerplate code. <!-- |
| All times are GMT -4. The time now is 12:00 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC