Reply
REfresh @ 12 - is this possible?
Old 11-06-2004, 02:47 PM REfresh @ 12 - is this possible?
Spud In Disguise's Avatar
Super Spam Talker

Posts: 784
Location: UK... where else?
Hey there. I know it is possible to get a page to automatically refresh every 'x' minutes or seconds, but is it possible to make a page refresh according to time?

I am designing a normal HTML page which is more than likely going to be kept open by users for a long time and since the content will automatically be changed at 12am every night I was wondering if it is possible to set the page to be refreshed at 12:05am, so that my users are guaranteed to have the latest version of the page displayed.

Any help anyone?
__________________
thedaftclub.com - Daft Punk Fansite
www.recommendedmusicblog.com - Music Recommendation Blog
Spud In Disguise is offline
Reply With Quote
View Public Profile Visit Spud In Disguise's homepage!
 
When You Register, These Ads Go Away!
Old 11-10-2004, 09:15 PM
Arctic Fox's Avatar
Junior Talker

Posts: 4
Location: Murmansk
Well there's a couple issues here first;
  • Are people really sitting on your single page for hours on end?
  • What time is it where? 12:05am your time may be 8:05pm somewhere else - this problem may have to be handled server-side.
  • Have you thought of using the META tag refresh?
  • How about just having JavaScript or META tag refresh every 3 hours?

Don't get me wrong, it can be done (with a bit of work)... but is it really required?
__________________
Abigail Dreams
~ Roads? Where we’re going we don’t need, roads! ~
Arctic Fox is offline
Reply With Quote
View Public Profile Visit Arctic Fox's homepage!
 
Old 11-10-2004, 09:18 PM
Anacrusis's Avatar
Defies a Status

Posts: 2,099
Name: Adam
Location: Colchester CT
Just remind your visitors to press F5 at midnight.. problem solved
Anacrusis is offline
Reply With Quote
View Public Profile Visit Anacrusis's homepage!
 
Old 11-11-2004, 04:52 PM
Spud In Disguise's Avatar
Super Spam Talker

Posts: 784
Location: UK... where else?
It's actually not going to be used on a website, ti's in an application that displays web pages in a windows app box. So it looks like a normal program but is actually a web page, therefore people will be on it for hours - also it is designed for my town website so it only applies to people in my time zone...
__________________
thedaftclub.com - Daft Punk Fansite
www.recommendedmusicblog.com - Music Recommendation Blog
Spud In Disguise is offline
Reply With Quote
View Public Profile Visit Spud In Disguise's homepage!
 
Old 11-11-2004, 08:59 PM
Arctic Fox's Avatar
Junior Talker

Posts: 4
Location: Murmansk
I think I may have found something on the net that you'd be able use.

(edited for your situation):

Code:
<html>
<head>


<script type="text/javascript">
<!--
var GoOff_Hour=00; //24 hour clock
var GoOff_Minute=05;

// current set at 12:05 AM
var Armed=true;

function CheckTime() {
var now = new Date();

if (now.getHours()>=GoOff_Hour && now.getMinutes()>=GoOff_Minute && Armed==true) {
window.location.reload(); 
Armed=false;
}

setTimeout("CheckTime()",1000)


}
//-->
</script> 


</head>

<body onload="CheckTime();">

</body>

</html> 
__________________
Abigail Dreams
~ Roads? Where we’re going we don’t need, roads! ~
Arctic Fox is offline
Reply With Quote
View Public Profile Visit Arctic Fox's homepage!
 
Reply     « Reply to REfresh @ 12 - is this possible?
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 10.16055 seconds with 12 queries