I have a VisualForce page that I'd like to do some cleanup if the user navigates off the page without performing certain actions. Notably, if they don't submit the form with either a submit button or cancel. Most often using the back button on the browser. I can't use remoting(AJAX) because the page most often runs in a console and iFrames do not allow AJAX execution.
Any ideas on how to emulate the clicking of the "Cancel" button?