Refreshing page in Javascript

In this article we will see that how to refresh or reload a page through Java Script there are a lot of ways to refresh or reload a document depending how we want (from server side
,get request, post request or from browser cache) some of the ways is given bellow.

  • To Refreshing page through Get request

<input type="button" value="Reload Page"

  • To Refreshing page through last request (Get or Post)

<input type="button" value="Reload Page" onClick="window.location.reload()">

  • To reload page through browser cache 

<input type="button" value="Reload Page" onClick="history.go(0)">

  • To Refreshing Periodically

function refreshPeriodic()

  • Reloading page through Meta Tag automatically after 10 seconds.

    <meta http-equiv="refresh" content="10" />

Recent Posts