Auto-Refresh Page

 How to refresh my page every 5 min ? Can someone help me ?
LVL 1
quanghocAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

freshmeatCommented:
add this line on the beginning of your page:
<META HTTP-EQUIV="REFRESH" CONTENT=300>

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HencahCommented:
Hi,

You can use script to do that, try this:

<html>
<body>
<SCRIPT LANGUAGE=javascript>
<!--
  alert('reload in action') // just a sign of life
  setInterval('location.reload(true)',1000)
//-->
</SCRIPT>
</body>
</html>

I use reload function with parameter true, it means that it will force to get the page from the server not from local cache.
Put that script into any place in the body tag.

...but it may not work in Netscape, change setInterval with setTimeout and location.reload('true') with location.href='yourpage.htm' and it'll work the same.

Good Luck
0
HencahCommented:
oops change the interval like this:

setInterval('location.reload(true)',300000)

5 min = 5*60*1000 msec
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

quanghocAuthor Commented:
 To freshmeat,
 I don't know how it works ? Why "300" ? Where should I put it ?
 
  To Hencah,
 Could you please tell me specifically how to do this in Netscape ? I've already done it very well in IE.

  Thanks, you guy.
0
freshmeatCommented:
ha, 5min * 60sec = 300 sec, ok?
my code can run on every browser
:D
it is a HTML gramma
0
HencahCommented:
to run in Netscape:

<SCRIPT LANGUAGE=javascript>
<!--
  alert("reload in action") // just a sign of life
  setTimeout("location.href='thispageagain.asp'",30000)
//-->
</SCRIPT>

to make freshmeat's works put that meta tag in the head section,like this:

<html>
<head>
<META HTTP-EQUIV="REFRESH" CONTENT=300>
</head>
....

and that tag (meta) add info into page header, the choice is up to you

Good Luck :)

0
quanghocAuthor Commented:
  Thanks.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.