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 single parameter forceGet which is optional. This parameter contains boolean value 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.
Before click on the button:
After click on the button: The document will reload.
Supported Browsers: The browser supported by DOM Location reload() Method are listed below:
- Google Chrome
- Internet Explorer
- HTML | Location assign( ) Method
- HTML | DOM Location replace() Method
- HTML | DOM KeyboardEvent location Property
- HTML | DOM Location hostname Property
- HTML | DOM Location origin Property
- HTML | DOM Location port Property
- HTML | DOM Location pathname Property
- HTML | DOM Location protocol Property
- HTML | DOM Location Search Property
- HTML | DOM Location hash Property
- HTML | DOM Location href Property
- HTML | DOM Location host Property
- What’s the best way to reload / refresh an iframe?
- How to make workaround for window.location.href?
- Python script to open a Google Map location on clipboard
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.