Cleanup.
Use onbeforeunload to try and reduce form content loss.