I'm currently using this script:
window.onbeforeunload=function(){window.scrollTo(0,0);}
Edited: I want to scroll the page to the top when triggering a page refresh.
The problem is that the script is also working/executing when a user clicks on an a href
element which is a download link from a subdomain that represent a downloadserver (that is hosted on external host) - let's say downloadserver.mydomain.com
<a href="xxx.mydomain.com/filetodownload.extension">
Is it possible to exclude the triggering when user click on such link with that specific subdomain?
Thank you.