Method In JavaScript To Reload The Page By Using Windows.location.reload True
Hi, how to use the method windows.location.reload true for reloading a URL while using Javascript code?
Hi, how to use the method windows.location.reload true for reloading a URL while using Javascript code?
There are plenty of ways to execute a reload in Java script. More common is the usage of href, reload, and go functions.
Here, in this, I will explain how the function/method window.location.reload true method. “force-reload” can be an optional parameter that can be used.
If the parameter value is set as true, it won’t use the browser cached data while reloading – Window.location.reload(true)
If the parameter value is set as false, it will use the browser cached data while reloading- Window.location.reload(false). By default, the parameter value is always false.
For example, this method is invoked as follows:
<script>
page_reload()
{ window.location.reload();
} </script>