zc1 Posted May 27, 2007 Share Posted May 27, 2007 Hi, I think my site is having a cache problem as on a refresh it different as I log the number of visitors, so I did a google and found the below code. My question is, is this code ok, by this I mean will it affect search engines, rankings etc... <? //Set no caching header("Expires: Mon, 26 Jul 1997 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"); ?> Regards, Garry Quote Link to comment https://forums.phpfreaks.com/topic/53144-solved-is-this-php-code-ok-cahce/ Share on other sites More sharing options...
rhyspaterson Posted May 27, 2007 Share Posted May 27, 2007 Its just the PHP version of what HTML meta tags do. So the PHP wont break anything. Quote Link to comment https://forums.phpfreaks.com/topic/53144-solved-is-this-php-code-ok-cahce/#findComment-262546 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.