I have some web application at say www.somewebsite.com, when user refreshes the page, I want it to navigate to say www.google.com or anything else.
What I tried was attach event
window.onunload = function(){...}
and
window.beforeunload = function(){...}
I tried
window.location = "http://google.com"
for some reason it is not working.
Anybody has idea how to solve this problem?
Thanks in advance.