javascript reload() method
Translation results:
UK[ˌri:ˈləʊd] US[ˌri:ˈloʊd]
vt.Reload, reload
Third person singular: reloads Present participle: reloading Past Formula: reloaded Past participle: reloaded
javascript reload() methodsyntax
Function: Reload the current document.
Syntax: location.reload(force)
Description: If the method does not specify parameters, or the parameter is false, it The HTTP header If-Modified-Since is used to detect whether the document on the server has changed. If the document has changed, reload() will download the document again. If the document has not changed, this method will load the document from the cache. This has the exact same effect as if the user clicked the browser's refresh button. If the parameter of this method is set to true, then regardless of the last modification date of the document, it will bypass the cache and re-download the document from the server. This has the exact same effect as if the user held down the Shift key while clicking the browser's refresh button.
javascript reload() methodexample
<html> <head> <meta charset="UTF-8"> <script type="text/javascript"> function reloadPage() { window.location.reload() } </script> </head> <body> <input type="button" value="Reload page" onclick="reloadPage()" /> </body> </html>
Run instance »
Click the "Run instance" button to view the online instance