CodeIgniter Forums
How to delete some data when browser close? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: How to delete some data when browser close? (/thread-57260.html)



How to delete some data when browser close? - El Forum - 03-01-2013

[eluser]Unknown[/eluser]
I set this one in my config file

$config['sess_expire_on_close'] = TRUE;

now browser closed that time session destroy successfully,

but i need some table data also updated using session variable(before session destroy)


thanks,

Ravikumar R


How to delete some data when browser close? - El Forum - 03-01-2013

[eluser]Aken[/eluser]
There's no server-side trigger for when a browser closes. You'd either need to use Javascript (which is unreliable because users can turn it off and manipulate it) or delete it when the user comes back when you've seen that their session is gone now.