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.
F5 or Ctrl+R or clicking the Reload button on the location/address bar reloads the current tab. Ctrl+F5 and Shift+Ctrl+R (<strike>F5</strike>) or holding Shift and clicking the Reload button reloads and bypasses the cache. The latter can be use if the former isn't working.
Chrome and Windows:Hold down Ctrl and click the Reload button. Or Hold down Ctrl and press F5.
In virtually all browsers, pressing the F5 key will cause the current page to refresh (on some Windows computers, you may have to hold down Fn while pressing F5 ).
By default, if it's using a lot of memory, Chrome purges the contents of some background tabs from RAM to conserve system resources. When you click back onto those tabs, the browser has to reload them because they have been erased from memory.
This will request for a page and not a reload.
window.location = window.location;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With