[PHP] Cleaning up automatically when leaving a page

2009-06-30 Thread Mary Anderson
Hi all, I have a php application for which I have a page which creates temporary junk and puts it into a persistent store (in this case a postgres database, but that is beside the point.) I have a Save button which puts the stuff I really want into the persistent store and cleans up

Re: [PHP] Cleaning up automatically when leaving a page

2009-06-30 Thread Michael A. Peters
Mary Anderson wrote: Hi all, I have a php application for which I have a page which creates temporary junk and puts it into a persistent store (in this case a postgres database, but that is beside the point.) I have a Save button which puts the stuff I really want into the persistent

Re: [PHP] Cleaning up automatically when leaving a page

2009-06-30 Thread Paul M Foster
On Tue, Jun 30, 2009 at 06:38:19PM -0700, Mary Anderson wrote: Hi all, I have a php application for which I have a page which creates temporary junk and puts it into a persistent store (in this case a postgres database, but that is beside the point.) I have a Save button which puts

Re: [PHP] Cleaning up automatically when leaving a page

2009-06-30 Thread WenDong Zhang
yes, the browser evoke unload event when leave the page (back, forward, or close). you can send a message via ajax, but it may not been received by the server successful, (when close the browser) I think the best way is maintaining a timestamp as michael paul say, and clear the 'junk' timely.

Re: [PHP] Cleaning up automatically when leaving a page

2009-06-30 Thread Phpster
On Jun 30, 2009, at 10:59 PM, Paul M Foster pa...@quillandmouse.com wrote: On Tue, Jun 30, 2009 at 06:38:19PM -0700, Mary Anderson wrote: Hi all, I have a php application for which I have a page which creates temporary junk and puts it into a persistent store (in this case a