location.reload
In this chapter you will learn:
reload method
location.reload()
reloads the current page.
<!DOCTYPE HTML> <!-- j a va 2s. c o m-->
<html>
<body>
<script>
location.reload(); //reload - possibly from cache
</script>
</body>
</html>
Force a reload
To force a reload from the server, pass in true as an argument like this:
<!DOCTYPE HTML> <!-- j a v a 2s.com-->
<html>
<body>
<script>
location.reload(true); //reload - go back to the server
</script>
</body>
</html>
Next chapter...
What you will learn in the next chapter: