Open In App
Related Articles

HTML DOM Location reload() Method

Improve Article
Save Article
Like Article

The location reload() method in HTML DOM is used to reload the current document. This method refreshes the current documents. It is similar to the refresh button in the browser. 


location.reload( forceGet )

Parameters: This method contains a single parameter forceGet which is optional. This parameter contains boolean values which are listed below:

  • True: Reloads the current page from the server.
  • False: Reloads the current from the cache.

Return Value: It does not return any value. 

Example: In this example, we will use the location reload() method


<!DOCTYPE html>
        HTML DOM Location reload() Method
    <!--script to reload current page-->
        function locationreload() {
        HTML DOM Location reload() Method
        Click on the button to reload the document
    <!-- script call here -->
    <button onclick="locationreload()">
        Reload page



Supported Browsers: The browser supported by DOM Location reload() Method are listed below:

  • Google Chrome 1
  • Edge 12
  • Internet Explorer 5.5
  • Firefox 1
  • Opera 3
  • Safari 1
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 14 Jun, 2023
Like Article
Save Article
Similar Reads
Complete Tutorials