I got the following code to refresh my webpage. It works great if I don’t submit anything with POST but if i do, i get a message from the browser when my webpage refreshes (see image below)
location.reload(true);
I’m not looking for the browser settings tweak. I’m looking for alternative code to refresh without asking.

This is caused due to the page being requested by
POSTinstead ofGET. Refreshing will resubmit thePOSTdata. You can force a get usingwindow.location = window.location.href;.If you want to allow people to reload the page through their browser controls then you will need to implement the PRG pattern which redirects to a
GETafter aPOST.