I'm guessing the reason it doesn't reload the page is because you are already on the page when clicking the link. Add a cache buster
<button type="button" onclick="window.location='http://localhost/test.php?param1=A¶m2=B&cb=' + new Date().getTime() + '#MyANCHOR';">