I have a js plugin that redirects the page after successful action.
I want to catch page unload and redirect to my own url.
I tried using beforeunload
event, but I can't use it because it just asks the user if it's ok with him to leave the page. Not quite what I'm looking for.
It does not matter what the plugin does, the question is:
Is it possible to catch page redirect event, and redirect to another url instead?