For example, with a slow internet connection the page might take a few seconds to load.
When a user presses reload or clicks any link on the page, I would like to show a message such as: “The page is loading…”
I can’t add the onclick event for all of the links in the page, nor do that with the browser’s reload button; is there is even an event for that?
Thanks for your reply!
Add a
document.onbeforeunloadhandler at the top of your<head>section so it executes as soon as possible: