i have a simple function on javascript where if the window position based on the url hashtag, so after the document is ready i execute my function normally, also i have add a hashchange event where i call the same function.
Everything works as expected except on internet explorer, if the user presses the enter on address bar without changing the hash (if he changes it works) then the function is not executed, any idea how to catch the event that the user pressed enter on the same url with same hashtag ?
When the user presses enter in the URL bar it loads the page, even if the adress wasn't changed. So, in your case it would simply refresh the page.
To capture this event you can use the
onbeforeunloadjavascript event. This event gives you the ability to determine the navigation type. Useevent.currentTarget.performance.navigation.typeto determine the type of navigation. This is working in IE, FF and Chrome.Hopefully this was of some help to you!!