Refresh/reload page when it first loads

liunx

Guest
What tag do I use to make sure a user gets the current webpage when they load the page on a repeat visit? Is there a tag to reload or refresh the page when it loads? <br />
<br />
I don't know if the refresh metatag is correct, because it does it at a timed interval, and appears if it would repeat the refresh again and again once the set time comes around again. <br />
<br />
Thanks.<!--content-->You could try some nocache headers to keep the page from caching itself, causing it to reload every time it is called.<br />
<br />
<meta http-equiv="cache-control" content="no-cache, must-revalidate"> <br />
<meta http-equiv="pragma" content="nocache"><!--content-->Originally posted by pyro <br />
You could try some nocache headers to keep the page from caching itself, causing it to reload every time it is called.<br />
<br />
<meta http-equiv="cache-control" content="no-cache, must-revalidate"> <br />
<meta http-equiv="pragma" content="nocache"> <br />
<br />
Thanks for your reply. The first tag seems logical, however what does pragma do?<br />
<br />
Also, if I use a no-cache tag, won't that slow down a repeat visitor? Is there anyway to force a browser to check to see what is updated only? <br />
<br />
Thanks.<!--content-->The only way I can think to check to see if a user was there before an update is using a cookie and then a java script to retrieve the last update date of the page. If you ask me it seems like a big pain in the butt. If you are using a server side language and the data is in a data base it will recache anyway, for example how many times have you come back to the forum and not had it change? If you are using a static html page how often do you think users are going to come to your site more then once in a short time frame?<!--content-->Pyro, <br />
<br />
I tried the nocache codes but they don't seem to work for me. If I update a page and repost it, then go to the page in my browser, the updated page does not appear. My web browser is IE6 with the setting for stored pages set to automatic. <br />
<br />
PeOfEo,<br />
<br />
I agree, that is too complicated. <br />
My pages are simple static, not server side.<!--content-->I think you might just have to give up. I dont think it will be that big of a deal though, static content doesnt draw too many repeat hits in a short time frame, that was the point I was trying to make. You could write a very complex script but then find that it isnt even needed because people dont visit your site often enough.<!--content-->
 
Back
Top