• May 01, 2024, 07:08:55 am

Author Topic: [CODE EXAMPLE] Auto refresh webpage  (Read 2164 times)

0 Members and 1 Guest are viewing this topic.

Offline Allstar12345

  • Allstar Software Founder
  • Administrator
  • Forum Genius
  • ******
  • Posts: 5,235
  • Reputation: 812
    • Allstar Software
  • Current Phone: : OnePlus 8 Pro, Xperia 10, Nexus 6p, Jolla Phone, Nokia N8, Nokia 808 PureView, BlackBerry Z30
[CODE EXAMPLE] Auto refresh webpage
« on: September 23, 2012, 09:57:03 pm »
Code: [Select]
<meta http-equiv="REFRESH" content="10;url=URL HERE">
<html>
<head>
<script type="text/JavaScript">
<!--
function timedRefresh(timeoutPeriod) {
setTimeout("location.reload(true);",timeoutPeriod);
}
//   -->
</script>
</head>
<body onload="JavaScript:timedRefresh(5000);">
</body>

Set the auto refresh value in milliseconds aka 5000=5 seconds
Code: [Select]
<body onload="JavaScript:timedRefresh(5000);">