Log in

View Full Version : Automatic Refresh on Website


wzartv
Feb 16, 2006, 05:50 PM
Hello,

How can I set up a web site to automatically refresh daily on the viewers browser... the home page is upadated constantly and I want to make sure visitors are seeing the most current version of the home page. How can I set that if it has been more than 24 hours, the page will automatically refresh on their browser instead of the stored temp internet files?

This involves using a cookie, correct?

How can I do this?

klmgb
Feb 16, 2006, 06:19 PM
I'm a bit new at this, but learning fast. I found thia about autorefresh. You can put this in the head tag
<meta http-equiv=refresh content="0; url=index.htm">
that will cause the page to refresh, the 0 being the number of seconds before the site refreshes. Now I just looked this up on the internet, and I'm sure someone with a lot more experience than me will be able to tell you if this will work. Usually if I have a question about html I Google HTML and whatever I'm looking for. IE "HTML auto refresh webpage" and get a whole lot of info.
There should also be a way to force the site to load from the server, I'm looking that up now.

wzartv
Feb 16, 2006, 06:23 PM
Hello,

Thanks for your response... however I only want it to refresh about once every day (just to update everyone's cache on the site)... I believe what you gave me would refresh it every 10, 20 seconds or minutes and I don't want to do that (it would torture dial-up users!) Thanks for your research!

klmgb
Feb 16, 2006, 06:46 PM
You probably want it to do is force it to load from the server then unless you are going to have visitors on the website for 24 hours. (or change the 0 to 86400

Some good info here

http://groups.google.com/group/alt.html/browse_thread/thread/3680d170fed218f/763a392f7b79597c%23763a392f7b79597c?sa=X&oi=groupsr&start=0&num=3

klmgb
Feb 16, 2006, 06:49 PM
BTW, this is a good place to get website answers but there are a lot of forums that are more specific to websites/computers

LTheobald
Feb 17, 2006, 02:31 AM
Wzar - are you using either PHP or ASP for you pages? We need to know this so that we can point out suitable code for the cookies.

Also, instead of the refresh technique - try this (http://www.htmlgoodies.com/beyond/reference/article.php/3472881). That should prevent the page from being cached by the user (cached means stored in the user's temporary internet files). So whenever they visit the page, they get the latest info.

That said though, if the page is dynamically created (PHP/ASP/JSP) then I don't think you should be having any refresh troubles like this.

djcritch
Aug 7, 2009, 03:31 AM
Just use an online auto refresher like http://www.refreshthis.com