Method In JavaScript To Reload The Page By Using Windows.location.reload True

Asked By 10 points N/A Posted on -
qa-featured

Hi, how to use the method windows.location.reload true for reloading a URL while using Javascript code?

SHARE
Answered By 10 points N/A #331949

Method In JavaScript To Reload The Page By Using Windows.location.reload True

qa-featured

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>

Login/Register to Answer

Related Questions