Any Javascript event occurring when user clicks Stop load button?

Internet Explorer has a document.onstop event that is fired, but other browsers don’t seem to support that. Note that it’s fired when the user clicks Stop or hits Esc, OR if the user navigates to another page during page load, which has the same effect.

I don’t believe there is a reliable way to trigger an event on clicking Stop in other browsers. Perhaps it would be possible to do something like: keeping the connection to the server open (as in the Comet approach), streaming some sort of keep-alive down the connection, and detecting if the stream ends (as I assume it would if the Stop button were clicked).

Leave a Comment