Please login or register. Welcome to the Studio, guest!

Quick Links:



Moose Avatar

Senior Member


August 2005
I don't know of another way to refresh than how I did this function or through meta tags. Anyway I made a simple little function to handle page refreshing when scripting.

The function:
function refresh(time){
time = parseInt(time);
setTimeout("location.href = location.href",time);
} else {
location.href = location.href;

refresh() can take one parameter or none. The parameter is the number of milliseconds the script should wait before committing to the function. If you don't express a parameter then it will refresh right away.

So to recap I want to refresh right away:


I want to refresh after 50 milliseconds:


Hope that helps. :P

Greg says:
Coding music...
Greg says:
Greg says:
I wouldn't rule it out. :P
Chris 3.0 [New features? Yes.] says:
Greg says:
If you think about machine code it's a bunch of 1s and 0s
Chris 3.0 [New features? Yes.] says:
Anything is possible.
Greg says:
Yeah try to code Metallica
Chris 3.0 [New features? Yes.] says:
:P Yeah, I'll get right on that... right after I learn to fly.


Chris Avatar

Head Coder


June 2005
location.reload(); <3 :P

But other then that, your idea is very helpful. But I've read some browsers don't support it, so infact, the best method, is to use something like this.

} else {
location.href = location.href;

Or something to that effect.

Also, maybe provide an optional parent, so you can refresh specific frames, popups, etc.