# Web Development > JavaScript refresh the page using javascript...

## psuresh1982

Using javascript i want to refresh my page every 2 minutes....Is there any function in javascript ?

-------------------
suresh

----------


## TigerElango

```
function reload()
    {
         window.location.reload();
     }
```

 this method will reload the page when u call the method.....but not for every two minutes......

the same situation happened for me also ie...to refresh the page every 30 seconds....my friend gave me a piece of code which refreshes every 30 seconds.....but i didn't tried that.....here is that code...



```
function refreshPeriodic()
{
   location.reload();
   timerID=setTimeout("refreshPeriodic()",30000);
}
timerID=setTimeout("refreshPeriodic()",30000);
```


i think it may be useful for u......

----------


## TigerElango

```
function refreshPeriodic()
{
   location.reload();
   timerID=setTimeout("refreshPeriodic()",30000);
}
timerID=setTimeout("refreshPeriodic()",30000);
```

sorry i don't know why the code is not displayed in the previous reply.........

----------


## psuresh1982

hi elango i can't see the code..can you upload it. don't use "script" tag..you just post the function.

--------------------
suresh

----------


## TigerElango

```
function refreshPeriodic()
{
   location.reload();
   timerID=setTimeout("refreshPeriodic()",30000);
}
timerID=setTimeout("refreshPeriodic()",30000);
```

----------


## suji

add this 



```

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


```

refreshes for every 10 sec

----------


## sarathmr

```
    function reFres() {
  location.reload(true)
}
/* Set the number below to the amount of delay, in milliseconds,
you want between page reloads: 1 minute = 60000 milliseconds. */
window.setInterval("reFres()",3000);
// End -->
```

----------


## nagasen

```
function fun(){
var a=setTimeout(funName(),1000)
}



```

----------

