I’m using jQuery Mobile and have turned off the default AJAX handling of forms and links, and I’m using
$.mobile.showPageLoadingMsg()
to display the page loading message when I submit a form that transitions me to a different page. This works fine except for the fact that if I use the hardware back button on the device, or the browser’s back button to go back to the form, the page loading message is still running. I’ve tried calling
$.mobile.hidePageLoadingMsg()
on document ready but this didn’t seem to fire when I used the back button to go back.
This could be solved by listening to window unload and hiding the message there:
It seems like somewhat of a hack though.