You are here: Reference > JavaScript > client-side > HTML DOM > methods > reload (location)

reload method (location)

Browser support:
Reloads the current page.

Syntax:

object.reload ([fromServer]);
You can find the related objects in the Supported by objects section below.

Parameters:

fromServer
Optional. Boolean that specifies the type of reloading.
One of the following values:
false
Default. Allows reloading the current document from the browser's cache.
true
The current document must be reloaded form the server.

Return value:

This method has no return value.

Example HTML code 1:

This example illustrates the use of the reload method:
<head>
    <script type="text/javascript">
        function Reload () {
            window.location.reload ()
        }
    </script>
</head>
<body>
    <button onclick="Reload ()">Reload this page!</button>
</body>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content