I am sending/receiving values on the same page using hashtag. Every time I change the hash values I manually reload the page after pressing a button and assigning values. For example
<input type="button" value="go to step 2" onclick="reloadpage();"
function reloadpage() {
window.location.hash = "val1:xxx,val2:yyy,val3:zzz";
window.location.reload();
}
if the user press the browser back or forward buttons, the url hash changes but the page not reloads. Is there any way to detect if history.change and refresh the page?
Use modern day html5 pushState.