Updated on Kisan Patel
This tutorial will show you how to refresh the current page using JavaScript?
You can use location.reload()
method to reloads the current page.
Syntax:
location.reload(forcedReload);
Here, By default, the location.reload() method reloads the page from the cache. so you need to reload the page from server by using forcedReload
parameter like below:
location.reload(true);
Example:
<script type="text/javascript"> document.write(new Date()); function ReloadPage(){ // Reload the current page, without using the cache document.location.reload(true); } </script> <input type="button" onclick="ReloadPage()" />