I have a site where I update the content every day. However, not all of my returning visitors hit the refresh when they come back and are thus stuck with the old content, think it wasn't updated, then leave and don't come back. I do every thing I can to make sure my visitors know to refresh when visiting my site but there are still some who don't. Does anyone know of any kind of code I can put in my page that tells their browser to refresh the page every time it's loaded?
As far as custom code not really. My site is straight HTML, no PHP. I do have code for stats tracking and and the alexa traffic box though.
You are using HTML static code. Use PHP or ASP to make it dynamic site. You have to convert your website in dynamic. You should make a database from where contents will be automatically updated when you need to only store fresh content into the database. Hope you have understand it.
<? header("Expires: Mon, 26 Jul 1995 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); ?> use this in php file When ever they come on site they will see fresh page Regards Alex
No need to go through the trouble of using dynamic pages if you only running HTML, use meta tags: <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> Code (markup): Peace,