title: javascript window.reload then window.location.href
body: <p>I want to make a code in which the window reloads and then the location is changed, though i tried <code>window.location.reload(); window.location.href="#id"</code> but it didn't work because when the page will reload, the script won't run. <br> Actually i want to clear the POST data from the page and then change the location on the same page to an id.   </p>